Browse Source

INS: calibrated method checks all accelerometers

mission-4.1.18
Randy Mackay 11 years ago
parent
commit
7e04b5d1f1
  1. 9
      libraries/AP_InertialSensor/AP_InertialSensor.cpp

9
libraries/AP_InertialSensor/AP_InertialSensor.cpp

@ -490,7 +490,14 @@ failed: @@ -490,7 +490,14 @@ failed:
/// @note this should not be called while flying because it reads from the eeprom which can be slow
bool AP_InertialSensor::calibrated()
{
return _accel_offset[0].load();
// check each accelerometer has offsets saved
for (uint8_t i=0; i<get_accel_count(); i++) {
if (!_accel_offset[i].load()) {
return false;
}
}
// if we got this far the accelerometers must have been calibrated
return true;
}
// _calibrate_model - perform low level accel calibration

Loading…
Cancel
Save