Changeset 340 in flair-src for trunk/lib/FlairSensorActuator/src/Imu.cpp
- Timestamp:
- 11/28/19 17:08:04 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/Imu.cpp
r198 r340 49 49 } 50 50 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 60 51 Imu::~Imu() { 61 if (mainTab != NULL) 62 delete mainTab; 52 delete mainTab; 63 53 } 64 54 … … 97 87 98 88 void Imu::LockUserInterface(void) const { 99 if (sensorTab == NULL) {100 Err("not applicable for simulation part.\n");101 return;102 }103 89 sensorTab->setEnabled(false); 104 90 } 105 91 106 92 void Imu::UnlockUserInterface(void) const { 107 if (sensorTab == NULL) {108 Err("not applicable for simulation part.\n");109 return;110 }111 93 sensorTab->setEnabled(true); 112 94 } 113 95 114 96 void Imu::UseDefaultPlot(void) { 115 if (tab == NULL) {116 Err("not applicable for simulation part.\n");117 return;118 }119 97 120 98 plotTab = new Tab(tab, "IMU"); … … 126 104 azPlot->AddCurve(imuData->Element(ImuData::RawAz)); 127 105 128 if (plotTab == NULL)129 plotTab = new Tab(tab, "IMU");130 106 gxPlot = new DataPlot1D(plotTab->NewRow(), "gyr_x", -500, 500); 131 107 gxPlot->AddCurve(imuData->Element(ImuData::RawGxDeg)); … … 135 111 gzPlot->AddCurve(imuData->Element(ImuData::RawGzDeg)); 136 112 137 if (plotTab == NULL)138 plotTab = new Tab(tab, "IMU");139 113 mxPlot = new DataPlot1D(plotTab->NewRow(), "mag_x", -500, 500); 140 114 mxPlot->AddCurve(imuData->Element(ImuData::RawMx));
Note:
See TracChangeset
for help on using the changeset viewer.