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

Last change on this file since 330 was 268, checked in by Sanahuja Guillaume, 3 years ago

add defines for architectures to speed up compile time

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#ifdef ARMV7A
18
19#include "Gx3_25_imu.h"
20#include <FrameworkManager.h>
21#include "Gx3_25_imu_impl.h"
22#include <GroupBox.h>
23#include <ImuData.h>
24
25using std::string;
26using namespace flair::core;
27
28namespace flair {
29namespace sensor {
30
31Gx3_25_imu::Gx3_25_imu(string name,
32                       SerialPort *serialport, Command_t command,
33                       uint8_t priority)
34    : Imu(name), Thread(getFrameworkManager(), name, priority) {
35  pimpl_ = new Gx3_25_imu_impl(this, name, serialport, command, GetGroupBox());
36
37  if (command == EulerAnglesAndAngularRates) {
38    Printf("Gx3_25_imu enabling EulerAnglesAndAngularRates\n");
39  } else if (command == AccelerationAngularRateAndOrientationMatrix) {
40    Printf("Gx3_25_imu enabling AccelerationAngularRateAndOrientationMatrix\n");
41  } else if (command == Quaternion) {
42    Printf("Gx3_25_imu enabling Quaternion\n");
43  } else {
44    Thread::Err("command not supported (%i)\n", command);
45  }
46  // AddDataToLog(imudata);
47}
48
49Gx3_25_imu::~Gx3_25_imu() {
50  SafeStop();
51  Join();
52  delete pimpl_;
53}
54
55void Gx3_25_imu::Run(void) { pimpl_->Run(); }
56
57} // end namespace sensor
58} // end namespace flair
59
60#endif
Note: See TracBrowser for help on using the repository browser.