[10] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[10] | 4 | // %flair:license}
|
---|
[7] | 5 | /*!
|
---|
| 6 | * \file MetaDualShock3.h
|
---|
| 7 | * \brief Classe intégrant la manette DualShock3 et les consignes joystick
|
---|
| 8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 9 | * \date 2014/01/14
|
---|
| 10 | * \version 3.4
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef METADUALSHOCK3_H
|
---|
| 14 | #define METADUALSHOCK3_H
|
---|
| 15 |
|
---|
| 16 | #include <TargetEthController.h>
|
---|
| 17 |
|
---|
| 18 | namespace flair {
|
---|
[15] | 19 | namespace core {
|
---|
| 20 | class AhrsData;
|
---|
| 21 | class Quaternion;
|
---|
[7] | 22 | }
|
---|
[15] | 23 | namespace filter {
|
---|
| 24 | class Ahrs;
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
[7] | 27 |
|
---|
| 28 | class MetaDualShock3_impl;
|
---|
| 29 |
|
---|
| 30 | namespace flair {
|
---|
| 31 | namespace meta {
|
---|
| 32 |
|
---|
[15] | 33 | /*! \class MetaDualShock3
|
---|
| 34 | *
|
---|
| 35 | * \brief Classe intégrant la manette MetaDualShock3
|
---|
| 36 | */
|
---|
| 37 | class MetaDualShock3 : public sensor::TargetEthController {
|
---|
| 38 | friend class ::MetaDualShock3_impl;
|
---|
[7] | 39 |
|
---|
[15] | 40 | public:
|
---|
| 41 | MetaDualShock3(core::FrameworkManager *parent, std::string name,
|
---|
| 42 | uint16_t port, uint8_t priority);
|
---|
| 43 | ~MetaDualShock3();
|
---|
| 44 | core::AhrsData *GetReferenceOrientation(void) const;
|
---|
| 45 | float ZRef(void) const;
|
---|
| 46 | float DzRef(void) const;
|
---|
| 47 | void SetYawRef(float value);
|
---|
| 48 | /*!
|
---|
| 49 | * \brief Set yaw reference
|
---|
| 50 | *
|
---|
| 51 | * Yaw part of the output quaternion is obtained by integrating the wz desired
|
---|
| 52 | *angular speed.\n
|
---|
| 53 | * This method reset the yaw.
|
---|
| 54 | *
|
---|
| 55 | * \param value value, only the yaw part of the quaternion is used
|
---|
| 56 | */
|
---|
| 57 | void SetYawRef(core::Quaternion const &value);
|
---|
| 58 | void SetZRef(float value);
|
---|
| 59 | float RollTrim(void) const;
|
---|
| 60 | float PitchTrim(void) const;
|
---|
| 61 | void ErrorNotify(void);
|
---|
| 62 | void Rumble(uint8_t left_force, uint8_t left_timeout = 20,
|
---|
| 63 | uint8_t right_force = 0, uint8_t right_timeout = 0);
|
---|
| 64 | void SetLedON(unsigned int ledId);
|
---|
| 65 | void SetLedOFF(unsigned int ledId);
|
---|
| 66 | void FlashLed(unsigned int ledId, uint8_t on_timeout, uint8_t off_timeout);
|
---|
[7] | 67 |
|
---|
[15] | 68 | private:
|
---|
| 69 | class MetaDualShock3_impl *pimpl_;
|
---|
| 70 | };
|
---|
[7] | 71 | } // end namespace meta
|
---|
| 72 | } // end namespace flair
|
---|
| 73 | #endif // METADUALSHOCK3_H
|
---|