source: flair-src/trunk/lib/FlairSensorActuator/src/unexported/BlCtrlV2_impl.h@ 167

Last change on this file since 167 was 15, checked in by Bayard Gildas, 6 years ago

sources reformatted with flair-format-dir script

File size: 1.7 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: 2011/09/13
6// filename: BlCtrlV2_impl.h
7//
8// author: Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: objet integrant les moteurs i2c
14//
15//
16/*********************************************************************/
17
18#ifndef BLCTRLV2_IMPL_H
19#define BLCTRLV2_IMPL_H
20
21#include <stdint.h>
22#include <Object.h>
23
24#define MAX_MOTORS 8
25
26namespace flair {
27namespace core {
28class I2cPort;
29}
30namespace gui {
31class SpinBox;
32class GroupBox;
33class Layout;
34}
35namespace actuator {
36class BlCtrlV2;
37}
38namespace sensor {
39class BatteryMonitor;
40}
41}
42
43class BlCtrlV2_impl {
44public:
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;
51
52private:
53 void WriteValue(uint16_t value); // I2cPort mutex must be taken before calling
54 // this function
55 void DetectMotors(void);
56 void GetCurrentSpeedAndVoltage(float &current, float &speed,
57 float &voltage); // I2cPort mutex must be taken
58 // before calling this
59 // function
60 void GetCurrentAndSpeed(
61 float &current,
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};
68
69#endif // BLCTRLV2_IMPL_H
Note: See TracBrowser for help on using the repository browser.