Flair
Framework Libre Air
flair::filter::UavMultiplex Class Referenceabstract

Class defining uav multiplexing. More...

#include <UavMultiplex.h>

+ Inheritance diagram for flair::filter::UavMultiplex:

Public Member Functions

 UavMultiplex (std::string name)
 Constructor. More...
 
 ~UavMultiplex ()
 Destructor. More...
 
void SetRoll (float value)
 Set roll torque. More...
 
void SetPitch (float value)
 Set pitch torque. More...
 
void SetYaw (float value)
 Set yaw torque. More...
 
void SetThrust (float value)
 Set thrust. More...
 
void SetRollTrim (float value)
 Set roll trim. More...
 
void SetPitchTrim (float value)
 Set pitch trim. More...
 
void SetYawTrim (float value)
 Set yaw trim. More...
 
void Update (core::Time time)
 Update using provided datas. More...
 
void LockUserInterface (void) const
 Lock user interface. More...
 
void UnlockUserInterface (void) const
 Unlock user interface. More...
 
gui::LayoutGetLayout (void) const
 Layout. More...
 
virtual void UseDefaultPlot (void)
 Use default plot. More...
 
virtual uint8_t MotorsCount (void) const =0
 Motors count. More...
 
int MultiplexValue (int index) const
 Multiplex value. More...
 
gui::TabWidgetGetTabWidget (void) const
 Get TabWidget. More...
 
- Public Member Functions inherited from flair::core::IODevice
 IODevice (const Object *parent, std::string name)
 Constructor. More...
 
virtual ~IODevice ()
 Destructor. More...
 
void AddDeviceToLog (const IODevice *device)
 Add an IODevice to the logs. More...
 
void AddDataToLog (const io_data *data)
 Add an io_data to the log. More...
 
void OutputToShMem (bool enabled)
 Send the output to a shared memory. More...
 
bool IsReady (void) const
 is device ready More...
 
virtual DataType const & GetInputDataType () const
 
virtual DataType const & GetOutputDataType () const
 
- Public Member Functions inherited from flair::core::Object
 Object (const Object *parent=NULL, std::string name="", std::string type="")
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
std::string ObjectName (void) const
 Name. More...
 
std::string ObjectType (void) const
 Type. More...
 
const ObjectParent (void) const
 Parent. More...
 
std::vector< const Object * > * TypeChilds (void) const
 Childs of the same type. More...
 
std::vector< const Object * > * Childs (void) const
 Childs. More...
 
void Information (const char *function, int line, const char *format,...) const
 Formatted information. More...
 
void Warning (const char *function, const char *format,...) const
 Formatted warning. More...
 
void Error (const char *function, const char *format,...) const
 Formatted error. More...
 
bool ErrorOccured (bool recursive=true) const
 Has an errror occured? More...
 

Protected Member Functions

void SetMultiplexComboBox (std::string name, int index)
 Set multiplex ComboBox. More...
 
- Protected Member Functions inherited from flair::core::IODevice
void ProcessUpdate (io_data *data)
 Process the childs of type IODevice, and log if needed. More...
 
void SetIsReady (bool status)
 set is ready More...
 

Additional Inherited Members

- Public Types inherited from flair::core::Object
enum  color_t { Auto = 0, Red = 31, Green = 32, Orange = 33 }
 

Detailed Description

Class defining uav multiplexing.

Constructor & Destructor Documentation

flair::filter::UavMultiplex::UavMultiplex ( std::string  name)

Constructor.

Construct a uav multiplexing. It will be child of the FrameworkManager.

Parameters
namename
flair::filter::UavMultiplex::~UavMultiplex ( )

Destructor.

Member Function Documentation

void flair::filter::UavMultiplex::SetRoll ( float  value)

Set roll torque.

roll torque is placed in input(0,0)

Parameters
valuevalue between -1 and 1
void flair::filter::UavMultiplex::SetPitch ( float  value)

Set pitch torque.

pitch torque is placed in input(1,0)

Parameters
valuevalue between -1 and 1
void flair::filter::UavMultiplex::SetYaw ( float  value)

Set yaw torque.

yaw torque is placed in input(2,0)

Parameters
valuevalue between -1 and 1
void flair::filter::UavMultiplex::SetThrust ( float  value)

Set thrust.

thrust is placed in input(3,0)

Parameters
valuevalue between 0 and 1
void flair::filter::UavMultiplex::SetRollTrim ( float  value)

Set roll trim.

trim is placed in input(4,0)

Parameters
valuevalue
void flair::filter::UavMultiplex::SetPitchTrim ( float  value)

Set pitch trim.

trim is placed in input(5,0)

Parameters
valuevalue
void flair::filter::UavMultiplex::SetYawTrim ( float  value)

Set yaw trim.

trim is placed in input(6,0)

Parameters
valuevalue
void flair::filter::UavMultiplex::Update ( core::Time  time)

Update using provided datas.

Uses values specified by Set*().

Parameters
timetime of the update
void flair::filter::UavMultiplex::LockUserInterface ( void  ) const

Lock user interface.

User interface will be grayed out.
Use it do disallow changes when flying.

void flair::filter::UavMultiplex::UnlockUserInterface ( void  ) const

Unlock user interface.

User interface will be enabled.

gui::Layout* flair::filter::UavMultiplex::GetLayout ( void  ) const

Layout.

Layout to place custom widgets.

Returns
the layout
virtual void flair::filter::UavMultiplex::UseDefaultPlot ( void  )
inlinevirtual

Use default plot.

Derived class can implement this function do draw default plot.

Reimplemented in flair::filter::X4X8Multiplex.

virtual uint8_t flair::filter::UavMultiplex::MotorsCount ( void  ) const
pure virtual

Motors count.

This function must be reimplemented, in order to get the number of motors.

Returns
motors count

Implemented in flair::filter::X4X8Multiplex.

int flair::filter::UavMultiplex::MultiplexValue ( int  index) const

Multiplex value.

Get the mutliplexed value of a motor, if SetMultiplexComboBox() was used.

Parameters
indexindex of the motor, from 0 to MotorsCount()
Returns
multiplexed index of the motor
gui::TabWidget* flair::filter::UavMultiplex::GetTabWidget ( void  ) const

Get TabWidget.

Usefull to add tabs.

Returns
the TabWidget
void flair::filter::UavMultiplex::SetMultiplexComboBox ( std::string  name,
int  index 
)
protected

Set multiplex ComboBox.

Draws a ComboBox to define motor multiplexing.
This is used to change the order of the output motors.

Parameters
namedescription of the motor (ex front left)
indexindex of the motor, from 0 to MotorsCount()