Changeset 340 in flair-src for trunk/lib/FlairSensorActuator/src/Imu.cpp


Ignore:
Timestamp:
11/28/19 17:08:04 (2 years ago)
Author:
Sanahuja Guillaume
Message:

add servos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/Imu.cpp

    r198 r340  
    4949}
    5050
    51 Imu::Imu(const IODevice *parent,std::string name) : IODevice(parent, name) {
    52   imuData = new ImuData(this);
    53   mainTab = NULL;
    54   tab = NULL;
    55   sensorTab = NULL;
    56   setupGroupbox = NULL;
    57   rotation = NULL;
    58 }
    59 
    6051Imu::~Imu() {
    61   if (mainTab != NULL)
    62     delete mainTab;
     52  delete mainTab;
    6353}
    6454
     
    9787
    9888void Imu::LockUserInterface(void) const {
    99   if (sensorTab == NULL) {
    100     Err("not applicable for simulation part.\n");
    101     return;
    102   }
    10389  sensorTab->setEnabled(false);
    10490}
    10591
    10692void Imu::UnlockUserInterface(void) const {
    107   if (sensorTab == NULL) {
    108     Err("not applicable for simulation part.\n");
    109     return;
    110   }
    11193  sensorTab->setEnabled(true);
    11294}
    11395
    11496void Imu::UseDefaultPlot(void) {
    115   if (tab == NULL) {
    116     Err("not applicable for simulation part.\n");
    117     return;
    118   }
    11997
    12098  plotTab = new Tab(tab, "IMU");
     
    126104  azPlot->AddCurve(imuData->Element(ImuData::RawAz));
    127105
    128   if (plotTab == NULL)
    129     plotTab = new Tab(tab, "IMU");
    130106  gxPlot = new DataPlot1D(plotTab->NewRow(), "gyr_x", -500, 500);
    131107  gxPlot->AddCurve(imuData->Element(ImuData::RawGxDeg));
     
    135111  gzPlot->AddCurve(imuData->Element(ImuData::RawGzDeg));
    136112
    137   if (plotTab == NULL)
    138     plotTab = new Tab(tab, "IMU");
    139113  mxPlot = new DataPlot1D(plotTab->NewRow(), "mag_x", -500, 500);
    140114  mxPlot->AddCurve(imuData->Element(ImuData::RawMx));
Note: See TracChangeset for help on using the changeset viewer.