Flair
Framework Libre Air
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties
Srf08.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 SRF08_H
14 #define SRF08_H
15 
16 #include <Thread.h>
17 #include <UsRangeFinder.h>
18 
19 namespace flair {
20 namespace core {
21 class FrameworkManager;
22 class I2cPort;
23 }
24 namespace gui {
25 class SpinBox;
26 ;
27 }
28 }
29 
30 namespace flair {
31 namespace sensor {
36 class Srf08 : public core::Thread, public UsRangeFinder {
37 
38 public:
50  Srf08(const core::FrameworkManager *parent, std::string name,
51  core::I2cPort *i2cport, uint16_t address, uint8_t priority);
52 
57  ~Srf08();
58 
64  void SetRange(void);
65 
71  void SetMaxGain(void);
72 
73 private:
81  void UpdateFrom(const core::io_data *data){};
82 
89  void Run(void);
90 
91  void SendEcho(void);
92  void GetEcho(void);
93 
94  bool is_init;
95  core::Time echo_time;
96  float z_1, z_2;
97  gui::SpinBox *gain, *range;
98  uint16_t address;
99  core::I2cPort *i2cport;
100 };
101 } // end namespace sensor
102 } // end namespace flair
103 #endif // SRF08_H
Abstract class for data types.
Definition: io_data.h:77
Class for ultra sonic SRF08.
Definition: Srf08.h:36
void SetRange(void)
Set Range.
unsigned long long Time
Time definition, in ns.
Definition: Object.h:49
Base class for UsRangeFinder.
Definition: UsRangeFinder.h:40
Class displaying a QSpinBox on the ground station.
Definition: SpinBox.h:28
void SetMaxGain(void)
Set Max Gain.
Base class for UsRangeFinder.
Main class of the Framework library.
Definition: FrameworkManager.h:45
Abstract class for a thread.
Abstract class for a thread.
Definition: Thread.h:38
Srf08(const core::FrameworkManager *parent, std::string name, core::I2cPort *i2cport, uint16_t address, uint8_t priority)
Constructor.
Base class for i2c port.
Definition: I2cPort.h:31
~Srf08()
Destructor.