source: flair-src/trunk/lib/FlairSensorActuator/src/BlCtrlV2.h@ 13

Last change on this file since 13 was 3, checked in by Sanahuja Guillaume, 9 years ago

sensoractuator

File size: 2.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/*!
6 * \file BlCtrlV2.h
7 * \brief Class for Mikrokopter's blctrlv2
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2011/09/13
10 * \version 4.0
11 */
12
13#ifndef BLCTRLV2_H
14#define BLCTRLV2_H
15
16#include "Bldc.h"
17
18namespace flair
19{
20 namespace core
21 {
22 class FrameworkManager;
23 class I2cPort;
24 }
25 namespace sensor
26 {
27 class BatteryMonitor;
28 }
29}
30
31class BlCtrlV2_impl;
32
33namespace flair
34{
35namespace actuator
36{
37 /*! \class BlCtrlV2
38 *
39 * \brief Class for Mikrokopter's blctrlv2
40 *
41 * blctrlv2 drivers can also monitor the battery level. See GetBatteryMonitor().
42 */
43 class BlCtrlV2 : public Bldc
44 {
45 friend class ::BlCtrlV2_impl;
46
47 public:
48 /*!
49 * \brief Constructor
50 *
51 * Construct a BlCtrlV2.
52 *
53 * \param parent parent
54 * \param layout layout
55 * \param name name
56 * \param motors_count number of motors
57 * \param i2cport I2cPort
58 */
59 BlCtrlV2(const core::IODevice* parent,gui::Layout* layout,std::string name,uint8_t motors_count,core::I2cPort* i2cport);
60
61 /*!
62 * \brief Destructor
63 *
64 */
65 ~BlCtrlV2();
66
67 /*!
68 * \brief Get battery monitor
69 *
70 * \return BatteryMonitor
71 */
72 sensor::BatteryMonitor* GetBatteryMonitor(void) const;
73
74 /*!
75 * \brief Has speed measurement
76 *
77 * Reimplemented from Bldc. \n
78 *
79 * \return true if it has speed measurement
80 */
81 bool HasSpeedMeasurement(void) const{return true;};
82
83 /*!
84 * \brief Has current measurement
85 *
86 * Reimplemented from Bldc. \n
87 *
88 * \return true if it has current measurement
89 */
90 bool HasCurrentMeasurement(void) const{return true;};
91
92 private:
93 /*!
94 * \brief Set motors values
95 *
96 * Reimplemented from Bldc. \n
97 * Values size must be the same as MotorsCount()
98 *
99 * \param values motor values
100 */
101 void SetMotors(float* values);
102
103 class BlCtrlV2_impl* pimpl_;
104 };
105} // end namespace actuator
106} // end namespace flair
107#endif // BLCTRLV2_H
Note: See TracBrowser for help on using the repository browser.