source: flair-dev/trunk/include/FlairSensorActuator/BlCtrlV2.h@ 35

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

formatting script + include reformatted

File size: 2.0 KB
RevLine 
[4]1// %flair:license{
[13]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[4]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
[13]18namespace flair {
19namespace core {
20class FrameworkManager;
21class I2cPort;
[4]22}
[13]23namespace sensor {
24class BatteryMonitor;
25}
26}
[4]27
28class BlCtrlV2_impl;
29
[13]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;
[4]40
[13]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);
[4]55
[13]56 /*!
57 * \brief Destructor
58 *
59 */
60 ~BlCtrlV2();
[4]61
[13]62 /*!
63 * \brief Get battery monitor
64 *
65 * \return BatteryMonitor
66 */
67 sensor::BatteryMonitor *GetBatteryMonitor(void) const;
[4]68
[13]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; };
[4]77
[13]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; };
[4]86
[13]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);
[4]97
[13]98 class BlCtrlV2_impl *pimpl_;
99};
[4]100} // end namespace actuator
101} // end namespace flair
102#endif // BLCTRLV2_H
Note: See TracBrowser for help on using the repository browser.