source: flair-src/trunk/lib/FlairSensorActuator/src/Gx3_25_imu.cpp @ 103

Last change on this file since 103 was 103, checked in by Sanahuja Guillaume, 5 years ago

maj quaternion 3dmgx3

File size: 1.6 KB
Line 
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
24using std::string;
25using namespace flair::core;
26
27namespace flair {
28namespace sensor {
29
30Gx3_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());
35
36  if (command == EulerAnglesAndAngularRates) {
37    Printf("Gx3_25_imu enabling EulerAnglesAndAngularRates\n");
38  } else if (command == AccelerationAngularRateAndOrientationMatrix) {
39    Printf("Gx3_25_imu enabling AccelerationAngularRateAndOrientationMatrix\n");
40  } else if (command == Quaternion) {
41    Printf("Gx3_25_imu enabling Quaternion\n");
42  } else {
43    Thread::Err("command not supported (%i)\n", command);
44  }
45  // AddDataToLog(imudata);
46}
47
48Gx3_25_imu::~Gx3_25_imu() {
49  SafeStop();
50  Join();
51  delete pimpl_;
52}
53
54void Gx3_25_imu::Run(void) { pimpl_->Run(); }
55
56} // end namespace sensor
57} // end namespace flair
Note: See TracBrowser for help on using the repository browser.