[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 I2cPort;
|
---|
[4] | 21 | }
|
---|
[13] | 22 | namespace sensor {
|
---|
| 23 | class BatteryMonitor;
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
[4] | 26 |
|
---|
| 27 | class AfroBldc_impl;
|
---|
| 28 |
|
---|
[13] | 29 | namespace flair {
|
---|
| 30 | namespace actuator {
|
---|
| 31 | /*! \class AfroBldc
|
---|
| 32 | *
|
---|
| 33 | * \brief Class for Mikrokopter's blctrlv2
|
---|
| 34 | *
|
---|
| 35 | * blctrlv2 drivers can also monitor the battery level. See GetBatteryMonitor().
|
---|
| 36 | */
|
---|
| 37 | class AfroBldc : public Bldc {
|
---|
| 38 | friend class ::AfroBldc_impl;
|
---|
[4] | 39 |
|
---|
[13] | 40 | public:
|
---|
| 41 | /*!
|
---|
| 42 | * \brief Constructor
|
---|
| 43 | *
|
---|
| 44 | * Construct a AfroBldc.
|
---|
| 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 | AfroBldc(const core::IODevice *parent, gui::Layout *layout, std::string name,
|
---|
| 53 | uint8_t motors_count, core::I2cPort *i2cport);
|
---|
[4] | 54 |
|
---|
[13] | 55 | /*!
|
---|
| 56 | * \brief Destructor
|
---|
| 57 | *
|
---|
| 58 | */
|
---|
| 59 | ~AfroBldc();
|
---|
[4] | 60 |
|
---|
[13] | 61 | /*!
|
---|
| 62 | * \brief Has speed measurement
|
---|
| 63 | *
|
---|
| 64 | * Reimplemented from Bldc. \n
|
---|
| 65 | *
|
---|
| 66 | * \return true if it has speed measurement
|
---|
| 67 | */
|
---|
| 68 | bool HasSpeedMeasurement(void) const { return false; };
|
---|
[4] | 69 |
|
---|
[13] | 70 | /*!
|
---|
| 71 | * \brief Has current measurement
|
---|
| 72 | *
|
---|
| 73 | * Reimplemented from Bldc. \n
|
---|
| 74 | *
|
---|
| 75 | * \return true if it has current measurement
|
---|
| 76 | */
|
---|
| 77 | bool HasCurrentMeasurement(void) const { return false; };
|
---|
[4] | 78 |
|
---|
[13] | 79 | private:
|
---|
| 80 | /*!
|
---|
| 81 | * \brief Set motors values
|
---|
| 82 | *
|
---|
| 83 | * Reimplemented from Bldc. \n
|
---|
| 84 | * Values size must be the same as MotorsCount()
|
---|
| 85 | *
|
---|
| 86 | * \param values motor values
|
---|
| 87 | */
|
---|
| 88 | void SetMotors(float *values);
|
---|
[4] | 89 |
|
---|
[13] | 90 | class AfroBldc_impl *pimpl_;
|
---|
| 91 | };
|
---|
[4] | 92 | } // end namespace actuator
|
---|
| 93 | } // end namespace flair
|
---|
| 94 | #endif // AFROBLDC_H
|
---|