source: flair-src/trunk/lib/FlairFilter/src/PlaneMultiplex.h@ 461

Last change on this file since 461 was 461, checked in by Sanahuja Guillaume, 11 months ago

add plane files

File size: 1.9 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file PlaneMultiplex.h
7 * \brief Class defining plane multiplexing
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2022/01/05
10 * \version 4.0
11 */
12
13#ifndef PLANEMULTIPLEX_H
14#define PLANEMULTIPLEX_H
15
16#include <UavMultiplex.h>
17
18namespace flair {
19
20 namespace gui {
21 class ComboBox;
22 class DataPlot1D;
23 class DoubleSpinBox;
24 }
25 namespace core {
26 class Matrix;
27 }
28
29}
30
31namespace flair {
32namespace filter {
33/*! \class PlaneMultiplex
34*
35* \brief Class defining plane multiplexing
36*
37* The output order of the motors can be changed through ground station.
38*/
39class PlaneMultiplex : public UavMultiplex {
40
41public:
42
43 /*!
44 \enum MotorNames_t
45 \brief Motor names
46 */
47 typedef enum {
48 FrontMotor = 0,
49 AileronRight = 1,
50 AileronLeft = 2,
51 } MotorNames_t;
52
53 /*!
54 * \brief Constructor
55 *
56 * Construct a autogyre multiplexing. It will be child of the FrameworkManager.
57 *
58 * \param name name
59 * \param type type
60 */
61 PlaneMultiplex(std::string name);
62
63 /*!
64 * \brief Destructor
65 *
66 */
67 ~PlaneMultiplex();
68
69 /*!
70 * \brief Use default plot
71 *
72 * Plot the output values.
73 *
74 */
75 void UseDefaultPlot(void);
76
77 /*!
78 * \brief Motors count
79 *
80 * Reimplemented from UavMultiplex.
81 *
82 * \return motors count
83 */
84 uint8_t MotorsCount(void) const;
85
86 core::IODevice* GetBldcMultiplex(void) const;
87 core::IODevice* GetServosMultiplex(void) const;
88
89private:
90 /*!
91 * \brief Update using provided datas
92 *
93 * Reimplemented from IODevice.
94 *
95 * \param data data from the parent to process
96 */
97 void UpdateFrom(const core::io_data *data);
98
99 std::string ActuatorName(int index);
100
101 core::Matrix *output;
102 gui::DataPlot1D *plots[3];
103 core::IODevice *bldc,*servos;
104
105};
106} // end namespace filter
107} // end namespace flair
108#endif // PLANEMULTIPLEX_H
Note: See TracBrowser for help on using the repository browser.