[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 AfroBldc.h
|
---|
| 7 | * \brief Class for Mikrokopter's blctrlv2
|
---|
| 8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 9 | * \date 2015/06/15
|
---|
| 10 | * \version 4.0
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef AFROBLDC_H
|
---|
| 14 | #define AFROBLDC_H
|
---|
| 15 |
|
---|
| 16 | #include "Bldc.h"
|
---|
| 17 |
|
---|
[13] | 18 | namespace flair {
|
---|
| 19 | namespace core {
|
---|
| 20 | class FrameworkManager;
|
---|
| 21 | class I2cPort;
|
---|
[4] | 22 | }
|
---|
[13] | 23 | namespace sensor {
|
---|
| 24 | class BatteryMonitor;
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
[4] | 27 |
|
---|
| 28 | class AfroBldc_impl;
|
---|
| 29 |
|
---|
[13] | 30 | namespace flair {
|
---|
| 31 | namespace actuator {
|
---|
| 32 | /*! \class AfroBldc
|
---|
| 33 | *
|
---|
| 34 | * \brief Class for Mikrokopter's blctrlv2
|
---|
| 35 | *
|
---|
| 36 | * blctrlv2 drivers can also monitor the battery level. See GetBatteryMonitor().
|
---|
| 37 | */
|
---|
| 38 | class AfroBldc : public Bldc {
|
---|
| 39 | friend class ::AfroBldc_impl;
|
---|
[4] | 40 |
|
---|
[13] | 41 | public:
|
---|
| 42 | /*!
|
---|
| 43 | * \brief Constructor
|
---|
| 44 | *
|
---|
| 45 | * Construct a AfroBldc.
|
---|
| 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 | AfroBldc(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 | ~AfroBldc();
|
---|
[4] | 61 |
|
---|
[13] | 62 | /*!
|
---|
| 63 | * \brief Has speed measurement
|
---|
| 64 | *
|
---|
| 65 | * Reimplemented from Bldc. \n
|
---|
| 66 | *
|
---|
| 67 | * \return true if it has speed measurement
|
---|
| 68 | */
|
---|
| 69 | bool HasSpeedMeasurement(void) const { return false; };
|
---|
[4] | 70 |
|
---|
[13] | 71 | /*!
|
---|
| 72 | * \brief Has current measurement
|
---|
| 73 | *
|
---|
| 74 | * Reimplemented from Bldc. \n
|
---|
| 75 | *
|
---|
| 76 | * \return true if it has current measurement
|
---|
| 77 | */
|
---|
| 78 | bool HasCurrentMeasurement(void) const { return false; };
|
---|
[4] | 79 |
|
---|
[13] | 80 | private:
|
---|
| 81 | /*!
|
---|
| 82 | * \brief Set motors values
|
---|
| 83 | *
|
---|
| 84 | * Reimplemented from Bldc. \n
|
---|
| 85 | * Values size must be the same as MotorsCount()
|
---|
| 86 | *
|
---|
| 87 | * \param values motor values
|
---|
| 88 | */
|
---|
| 89 | void SetMotors(float *values);
|
---|
[4] | 90 |
|
---|
[13] | 91 | class AfroBldc_impl *pimpl_;
|
---|
| 92 | };
|
---|
[4] | 93 | } // end namespace actuator
|
---|
| 94 | } // end namespace flair
|
---|
| 95 | #endif // AFROBLDC_H
|
---|