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

Last change on this file since 330 was 137, checked in by Sanahuja Guillaume, 5 years ago

singleton manager

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