Flair
Framework Libre Air
MetaDualShock3.h
Go to the documentation of this file.
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}
13 #ifndef METADUALSHOCK3_H
14 #define METADUALSHOCK3_H
15 
16 #include <TargetController.h>
17 #include <IODevice.h>
18 
19 namespace flair {
20 namespace core {
21 class AhrsData;
22 class Quaternion;
23 }
24 namespace filter {
25 class Ahrs;
26 }
27 }
28 
29 class MetaDualShock3_impl;
30 
31 namespace flair {
32 namespace meta {
33 
39  friend class ::MetaDualShock3_impl;
40 
41 public:
42  MetaDualShock3(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);
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
Abstract class for data types.
Definition: io_data.h:94
Classe intégrant la manette MetaDualShock3.
Definition: MetaDualShock3.h:38
Abstract class for input/ouput system.
Definition: IODevice.h:45
namespace of the flair Framework
Definition: Ahrs.h:19
Class defining AHRS datas.
Definition: AhrsData.h:30
Base Class for target side remote controls.
Definition: TargetController.h:49
Abstract class for input/ouput system.
Class defining a quaternion.
Definition: Quaternion.h:26