source: flair-src/trunk/lib/FlairMeta/src/MetaDualShock3.h@ 25

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

sources reformatted with flair-format-dir script

File size: 1.9 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 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
18namespace flair {
19namespace core {
20class AhrsData;
21class Quaternion;
22}
23namespace filter {
24class Ahrs;
25}
26}
27
28class MetaDualShock3_impl;
29
30namespace flair {
31namespace meta {
32
33/*! \class MetaDualShock3
34*
35* \brief Classe intégrant la manette MetaDualShock3
36*/
37class MetaDualShock3 : public sensor::TargetEthController {
38 friend class ::MetaDualShock3_impl;
39
40public:
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);
67
68private:
69 class MetaDualShock3_impl *pimpl_;
70};
71} // end namespace meta
72} // end namespace flair
73#endif // METADUALSHOCK3_H
Note: See TracBrowser for help on using the repository browser.