source: flair-src/trunk/lib/FlairSensorActuator/src/unexported/Bldc_impl.h

Last change on this file was 340, checked in by Sanahuja Guillaume, 4 years ago

add servos

File size: 1.5 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// 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
24namespace flair {
25namespace gui {
26class DoubleSpinBox;
27class Layout;
28class Label;
29class DataPlot1D;
30class TabWidget;
31class PushButton;
32}
33namespace actuator {
34class Bldc;
35}
36}
37
38class Bldc_impl {
39public:
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
52private:
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.