Changeset 15 in flair-src for trunk/lib/FlairSensorActuator/src/unexported/BlCtrlV2_impl.h
- Timestamp:
- 04/08/16 15:40:57 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/unexported/BlCtrlV2_impl.h
r3 r15 16 16 /*********************************************************************/ 17 17 18 19 18 #ifndef BLCTRLV2_IMPL_H 20 19 #define BLCTRLV2_IMPL_H … … 25 24 #define MAX_MOTORS 8 26 25 27 namespace flair 28 { 29 namespace core 30 { 31 class I2cPort; 32 } 33 namespace gui 34 { 35 class SpinBox; 36 class GroupBox; 37 class Layout; 38 } 39 namespace actuator 40 { 41 class BlCtrlV2; 42 } 43 namespace sensor 44 { 45 class BatteryMonitor; 46 } 26 namespace flair { 27 namespace core { 28 class I2cPort; 29 } 30 namespace gui { 31 class SpinBox; 32 class GroupBox; 33 class Layout; 34 } 35 namespace actuator { 36 class BlCtrlV2; 37 } 38 namespace sensor { 39 class BatteryMonitor; 40 } 47 41 } 48 42 49 class BlCtrlV2_impl 50 { 51 public:52 BlCtrlV2_impl(flair::actuator::BlCtrlV2* self,flair::gui::Layout *layout,flair::core::I2cPort*i2cport);53 54 void SetMotors(float*value);55 56 43 class BlCtrlV2_impl { 44 public: 45 BlCtrlV2_impl(flair::actuator::BlCtrlV2 *self, flair::gui::Layout *layout, 46 flair::core::I2cPort *i2cport); 47 ~BlCtrlV2_impl(); 48 void SetMotors(float *value); 49 flair::sensor::BatteryMonitor *battery; 50 flair::gui::SpinBox *poles; 57 51 58 private: 59 void WriteValue(uint16_t value);//I2cPort mutex must be taken before calling this function 60 void DetectMotors(void); 61 void GetCurrentSpeedAndVoltage(float ¤t,float &speed,float &voltage);//I2cPort mutex must be taken before calling this function 62 void GetCurrentAndSpeed(float ¤t,float &speed);//I2cPort mutex must be taken before calling this function 63 flair::core::Time last_voltage_time; 64 int nb_mot; 65 flair::core::I2cPort* i2cport; 66 flair::actuator::BlCtrlV2* self; 52 private: 53 void WriteValue(uint16_t value); // I2cPort mutex must be taken before calling 54 // this function 55 void DetectMotors(void); 56 void GetCurrentSpeedAndVoltage(float ¤t, float &speed, 57 float &voltage); // I2cPort mutex must be taken 58 // before calling this 59 // function 60 void GetCurrentAndSpeed( 61 float ¤t, 62 float &speed); // I2cPort mutex must be taken before calling this function 63 flair::core::Time last_voltage_time; 64 int nb_mot; 65 flair::core::I2cPort *i2cport; 66 flair::actuator::BlCtrlV2 *self; 67 67 }; 68 68
Note:
See TracChangeset
for help on using the changeset viewer.