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 Gx3_25_imu_impl.h
|
---|
7 | * \brief Classe intégrant la centrale 3dmgx3-25
|
---|
8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
9 | * \date 2011/08/19
|
---|
10 | * \version 4.0
|
---|
11 | */
|
---|
12 |
|
---|
13 | #ifndef GX3_25_IMU_IMPL_H
|
---|
14 | #define GX3_25_IMU_IMPL_H
|
---|
15 |
|
---|
16 | #include "Gx3_25_imu.h"
|
---|
17 | #include <unistd.h> //ssize_t
|
---|
18 |
|
---|
19 | namespace flair {
|
---|
20 | namespace core {
|
---|
21 | class FrameworkManager;
|
---|
22 | class SerialPort;
|
---|
23 | class AhrsData;
|
---|
24 | }
|
---|
25 | namespace gui {
|
---|
26 | class SpinBox;
|
---|
27 | class CheckBox;
|
---|
28 | class PushButton;
|
---|
29 | class Label;
|
---|
30 | }
|
---|
31 | }
|
---|
32 |
|
---|
33 | /*! \class Gx3_25_imu_impl
|
---|
34 | *
|
---|
35 | * \brief Classe intégrant la centrale 3dmgx3-25
|
---|
36 | */
|
---|
37 |
|
---|
38 | class Gx3_25_imu_impl {
|
---|
39 |
|
---|
40 | public:
|
---|
41 | Gx3_25_imu_impl(flair::sensor::Gx3_25_imu *self, std::string name,
|
---|
42 | flair::core::SerialPort *serialport,
|
---|
43 | flair::sensor::Gx3_25_imu::Command_t command,
|
---|
44 | flair::gui::GroupBox *setupgroupbox);
|
---|
45 | ~Gx3_25_imu_impl();
|
---|
46 | void Run(void);
|
---|
47 |
|
---|
48 | private:
|
---|
49 | void DeviceReset(void);
|
---|
50 | void GetData(uint8_t *buf, ssize_t buf_size, flair::core::Time *time);
|
---|
51 | float Dequeue(uint8_t **buf);
|
---|
52 | void GyrosBias(void);
|
---|
53 | void SamplingSettings(void);
|
---|
54 | void SetBaudrate(int value);
|
---|
55 | bool CalcChecksum(uint8_t *buf, int size);
|
---|
56 | int FirmwareNumber(void);
|
---|
57 | void PrintModelInfo(void);
|
---|
58 | void RealignUpNorth(bool realign_up, bool realign_north);
|
---|
59 |
|
---|
60 | void SetContinuousMode(uint8_t continuous_command);
|
---|
61 |
|
---|
62 | flair::gui::GroupBox *setupgroupbox;
|
---|
63 | flair::gui::SpinBox *data_rate, *gyro_acc_size, *mag_size, *up_comp,
|
---|
64 | *north_comp;
|
---|
65 | flair::gui::CheckBox *coning, *disable_magn, *disable_north_comp,
|
---|
66 | *disable_grav_comp;
|
---|
67 | flair::gui::PushButton *button_bias;
|
---|
68 | flair::gui::Label *data_rate_label;
|
---|
69 |
|
---|
70 | flair::core::SerialPort *serialport;
|
---|
71 | uint8_t command;
|
---|
72 | flair::sensor::Gx3_25_imu *self;
|
---|
73 | flair::core::AhrsData *ahrsData;
|
---|
74 | };
|
---|
75 |
|
---|
76 | #endif // GX3_25_IMU_IMPL_H
|
---|