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 | // created: 2013/11/14
|
---|
6 | // filename: Bldc_impl.h
|
---|
7 | //
|
---|
8 | // author: Guillaume Sanahuja
|
---|
9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
10 | //
|
---|
11 | // version: $Id: $
|
---|
12 | //
|
---|
13 | // purpose: Virtual class for brushless drivers
|
---|
14 | //
|
---|
15 | //
|
---|
16 | /*********************************************************************/
|
---|
17 |
|
---|
18 | #ifndef BLDC_IMPL_H
|
---|
19 | #define BLDC_IMPL_H
|
---|
20 |
|
---|
21 | #include <IODevice.h>
|
---|
22 | #include <stdint.h>
|
---|
23 |
|
---|
24 | namespace flair {
|
---|
25 | namespace gui {
|
---|
26 | class DoubleSpinBox;
|
---|
27 | class Layout;
|
---|
28 | class Label;
|
---|
29 | class DataPlot1D;
|
---|
30 | class TabWidget;
|
---|
31 | class PushButton;
|
---|
32 | }
|
---|
33 | namespace actuator {
|
---|
34 | class Bldc;
|
---|
35 | }
|
---|
36 | }
|
---|
37 |
|
---|
38 | class Bldc_impl {
|
---|
39 | public:
|
---|
40 | Bldc_impl(flair::actuator::Bldc *self, flair::gui::Layout *layout,
|
---|
41 | std::string name, uint8_t motors_count);
|
---|
42 | ~Bldc_impl();
|
---|
43 | void UpdateFrom(const flair::core::io_data *data);
|
---|
44 | void LockUserInterface(void) const;
|
---|
45 | void UnlockUserInterface(void) const;
|
---|
46 | bool are_enabled;
|
---|
47 | float *power;
|
---|
48 | void UseDefaultPlot(flair::gui::TabWidget *tab);
|
---|
49 | uint8_t motors_count;
|
---|
50 | flair::gui::Layout *layout;
|
---|
51 |
|
---|
52 | private:
|
---|
53 | float *values;
|
---|
54 | float Sat(float value);
|
---|
55 | flair::actuator::Bldc *self;
|
---|
56 | flair::gui::DoubleSpinBox *min_value, *max_value, *test_value;
|
---|
57 | flair::gui::Label *flight_time;
|
---|
58 | flair::gui::DataPlot1D *plots;
|
---|
59 | flair::core::Time flight_start_time;
|
---|
60 | flair::gui::PushButton **button_test;
|
---|
61 | int time_sec;
|
---|
62 | bool is_running;
|
---|
63 | flair::core::Time test_start_time;
|
---|
64 | int tested_motor; //=-1 if no motor is tested
|
---|
65 | };
|
---|
66 |
|
---|
67 | #endif // BLDC_IMPL_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.