[3] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[3] | 4 | // %flair:license}
|
---|
| 5 | // created: 2011/08/19
|
---|
| 6 | // filename: Gx3_25_imu.cpp
|
---|
| 7 | //
|
---|
| 8 | // author: Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: objet integrant la centrale 3dmgx3-25
|
---|
| 14 | //
|
---|
| 15 | //
|
---|
| 16 | /*********************************************************************/
|
---|
| 17 |
|
---|
| 18 | #include "Gx3_25_imu.h"
|
---|
| 19 | #include <FrameworkManager.h>
|
---|
| 20 | #include "Gx3_25_imu_impl.h"
|
---|
| 21 | #include <GroupBox.h>
|
---|
| 22 | #include <ImuData.h>
|
---|
| 23 |
|
---|
| 24 | using std::string;
|
---|
| 25 | using namespace flair::core;
|
---|
| 26 |
|
---|
[15] | 27 | namespace flair {
|
---|
| 28 | namespace sensor {
|
---|
[3] | 29 |
|
---|
[15] | 30 | Gx3_25_imu::Gx3_25_imu(const FrameworkManager *parent, string name,
|
---|
| 31 | SerialPort *serialport, Command_t command,
|
---|
| 32 | uint8_t priority)
|
---|
| 33 | : Imu(parent, name), Thread(parent, name, priority) {
|
---|
| 34 | pimpl_ = new Gx3_25_imu_impl(this, name, serialport, command, GetGroupBox());
|
---|
[3] | 35 |
|
---|
[15] | 36 | if (command == EulerAnglesAndAngularRates) {
|
---|
[3] | 37 |
|
---|
[15] | 38 | } else if (command == AccelerationAngularRateAndOrientationMatrix) {
|
---|
| 39 | Thread::Err("oneaxis rotation of rotation matrix is not yet implemented\n");
|
---|
| 40 | } else {
|
---|
| 41 | Thread::Err("command not supported (%i)\n", command);
|
---|
| 42 | }
|
---|
| 43 | // AddDataToLog(imudata);
|
---|
[3] | 44 | }
|
---|
| 45 |
|
---|
| 46 | Gx3_25_imu::~Gx3_25_imu() {
|
---|
[15] | 47 | SafeStop();
|
---|
| 48 | Join();
|
---|
| 49 | delete pimpl_;
|
---|
[3] | 50 | }
|
---|
| 51 |
|
---|
[15] | 52 | void Gx3_25_imu::Run(void) { pimpl_->Run(); }
|
---|
[3] | 53 |
|
---|
| 54 | } // end namespace sensor
|
---|
| 55 | } // end namespace flair
|
---|