Flair
Framework Libre Air
flair::filter::X4X8Multiplex Class Reference

Class defining X4 and X8 multiplexing. More...

#include <X4X8Multiplex.h>

+ Inheritance diagram for flair::filter::X4X8Multiplex:

Public Types

enum  UavType_t { X4, X8 }
 type of UAV More...
 
enum  MotorNames_t {
  TopFrontLeft = 0, TopFrontRight = 1, TopRearLeft = 2, TopRearRight = 3,
  BottomFrontLeft = 4, BottomFrontRight = 5, BottomRearLeft = 6, BottomRearRight = 7
}
 Motor names. More...
 
- Public Types inherited from flair::core::Object
enum  color_t { Auto = 0, Red = 31, Green = 32, Orange = 33 }
 

Public Member Functions

 X4X8Multiplex (std::string name, UavType_t type)
 Constructor. More...
 
 ~X4X8Multiplex ()
 Destructor. More...
 
void UseDefaultPlot (void)
 Use default plot. More...
 
uint8_t MotorsCount (void) const
 Motors count. More...
 
- Public Member Functions inherited from flair::filter::UavMultiplex
 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...
 
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...
 

Additional Inherited Members

- Protected Member Functions inherited from flair::filter::UavMultiplex
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...
 

Detailed Description

Class defining X4 and X8 multiplexing.

The output order of the motors can be changed through ground station.

Member Enumeration Documentation

type of UAV

Enumerator
X4 

4 motors: front left, front right, rear left, rear right

X8 

8 motors: top front left, top front right, top rear left, top rear right, bottom front left, bottom front right, bottom rear left, bottom rear right

Motor names.

Enumerator
TopFrontLeft 

Top front left, X4 or X8

TopFrontRight 

Top front right, X4 or X8

TopRearLeft 

Top rear left, X4 or X8

TopRearRight 

Top rear right, X4 or X8

BottomFrontLeft 

Bottom front left, X8

BottomFrontRight 

Bottom front right, X8

BottomRearLeft 

Bottom rear left, X8

BottomRearRight 

Bottom rear right, X8

Constructor & Destructor Documentation

flair::filter::X4X8Multiplex::X4X8Multiplex ( std::string  name,
UavType_t  type 
)

Constructor.

Construct a X4 and X8 multiplexing. It will be child of the FrameworkManager.

Parameters
namename
typetype
flair::filter::X4X8Multiplex::~X4X8Multiplex ( )

Destructor.

Member Function Documentation

void flair::filter::X4X8Multiplex::UseDefaultPlot ( void  )
virtual

Use default plot.

Plot the output values.

Reimplemented from flair::filter::UavMultiplex.

uint8_t flair::filter::X4X8Multiplex::MotorsCount ( void  ) const
virtual

Motors count.

Reimplemented from UavMultiplex.

Returns
motors count

Implements flair::filter::UavMultiplex.