source: flair-src/branches/mavlink/lib/FlairMeta/src/MetaDualShock3.h@ 49

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

Modif. pour ajour manette émulée (EmulatedController)

File size: 2.0 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 <TargetController.h>
17#include <IODevice.h>
18
19namespace flair {
20namespace core {
21class AhrsData;
22class Quaternion;
23}
24namespace filter {
25class Ahrs;
26}
27}
28
29class MetaDualShock3_impl;
30
31namespace flair {
32namespace meta {
33
34/*! \class MetaDualShock3
35*
36* \brief Classe intégrant la manette MetaDualShock3
37*/
38class MetaDualShock3 : public core::IODevice {
39 friend class ::MetaDualShock3_impl;
40
41public:
42 MetaDualShock3(core::FrameworkManager *parent, std::string name,
43 sensor::TargetController *controller);
44 ~MetaDualShock3();
45 core::AhrsData *GetReferenceOrientation(void) const;
46 float ZRef(void) const;
47 float DzRef(void) const;
48 void SetYawRef(float value);
49 /*!
50 * \brief Set yaw reference
51 *
52 * Yaw part of the output quaternion is obtained by integrating the wz desired
53 *angular speed.\n
54 * This method reset the yaw.
55 *
56 * \param value value, only the yaw part of the quaternion is used
57 */
58 void SetYawRef(core::Quaternion const &value);
59 void SetZRef(float value);
60 float RollTrim(void) const;
61 float PitchTrim(void) const;
62 void ErrorNotify(void);
63 void Rumble(uint8_t left_force, uint8_t left_timeout = 20,
64 uint8_t right_force = 0, uint8_t right_timeout = 0);
65 void SetLedON(unsigned int ledId);
66 void SetLedOFF(unsigned int ledId);
67 void FlashLed(unsigned int ledId, uint8_t on_timeout, uint8_t off_timeout);
68
69 private:
70 class MetaDualShock3_impl* pimpl_;
71 void UpdateFrom(const flair::core::io_data *data);
72 sensor::TargetController *controller;
73 };
74} // end namespace meta
75} // end namespace flair
76#endif // METADUALSHOCK3_H
Note: See TracBrowser for help on using the repository browser.