| 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 | // 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 |
|
---|
| 27 | namespace flair { namespace sensor {
|
---|
| 28 |
|
---|
| 29 | Gx3_25_imu::Gx3_25_imu(const FrameworkManager* parent,string name,SerialPort* serialport,Command_t command,uint8_t priority) : Imu(parent,name),Thread(parent,name,priority) {
|
---|
| 30 | pimpl_=new Gx3_25_imu_impl(this,name,serialport,command,GetGroupBox());
|
---|
| 31 |
|
---|
| 32 | if(command==EulerAnglesAndAngularRates) {
|
---|
| 33 |
|
---|
| 34 | } else if(command==AccelerationAngularRateAndOrientationMatrix) {
|
---|
| 35 | Thread::Err("oneaxis rotation of rotation matrix is not yet implemented\n");
|
---|
| 36 | } else {
|
---|
| 37 | Thread::Err("command not supported (%i)\n",command);
|
---|
| 38 | }
|
---|
| 39 | //AddDataToLog(imudata);
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | Gx3_25_imu::~Gx3_25_imu() {
|
---|
| 43 | SafeStop();
|
---|
| 44 | Join();
|
---|
| 45 | delete pimpl_;
|
---|
| 46 | }
|
---|
| 47 |
|
---|
| 48 | void Gx3_25_imu::Run(void) {
|
---|
| 49 | pimpl_->Run();
|
---|
| 50 | }
|
---|
| 51 |
|
---|
| 52 | } // end namespace sensor
|
---|
| 53 | } // end namespace flair
|
---|