Last change
on this file since 311 was 15, checked in by Bayard Gildas, 8 years ago |
sources reformatted with flair-format-dir script
|
File size:
1.6 KB
|
Rev | Line | |
---|
[3] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[3] | 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 |
|
---|
[15] | 24 | namespace flair {
|
---|
| 25 | namespace gui {
|
---|
| 26 | class DoubleSpinBox;
|
---|
| 27 | class Layout;
|
---|
| 28 | class Label;
|
---|
| 29 | class DataPlot1D;
|
---|
| 30 | class TabWidget;
|
---|
| 31 | class PushButton;
|
---|
[3] | 32 | }
|
---|
[15] | 33 | namespace actuator {
|
---|
| 34 | class Bldc;
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
[3] | 37 |
|
---|
[15] | 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(flair::actuator::Bldc *self, uint8_t motors_count); // simulation
|
---|
| 43 | ~Bldc_impl();
|
---|
| 44 | void UpdateFrom(const flair::core::io_data *data);
|
---|
| 45 | void LockUserInterface(void) const;
|
---|
| 46 | void UnlockUserInterface(void) const;
|
---|
| 47 | bool are_enabled;
|
---|
| 48 | float *power;
|
---|
| 49 | void UseDefaultPlot(flair::gui::TabWidget *tab);
|
---|
| 50 | uint8_t motors_count;
|
---|
| 51 | flair::gui::Layout *layout;
|
---|
[3] | 52 |
|
---|
[15] | 53 | private:
|
---|
| 54 | float *values;
|
---|
| 55 | float Sat(float value);
|
---|
| 56 | flair::actuator::Bldc *self;
|
---|
| 57 | flair::gui::DoubleSpinBox *min_value, *max_value, *test_value;
|
---|
| 58 | flair::gui::Label *flight_time;
|
---|
| 59 | flair::gui::DataPlot1D *plots;
|
---|
| 60 | flair::core::Time flight_start_time;
|
---|
| 61 | flair::gui::PushButton **button_test;
|
---|
| 62 | int time_sec;
|
---|
| 63 | bool is_running;
|
---|
| 64 | flair::core::Time test_start_time;
|
---|
| 65 | int tested_motor; //=-1 if no motor is tested
|
---|
[3] | 66 | };
|
---|
| 67 |
|
---|
| 68 | #endif // BLDC_IMPL_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.