source: flair-src/branches/mavlink/lib/FlairSensorActuator/src/BlCtrlV2.h@ 66

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

sources reformatted with flair-format-dir script

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