Browse Source

Arming: use compass.configured method

This checks that when compass offset learning is off, that the offsets
are non-zero and that the detected device id matches the device id
stored to eeprom when the offsets were last saved.
master
Randy Mackay 11 years ago
parent
commit
76369d153f
  1. 3
      libraries/AP_Arming/AP_Arming.cpp

3
libraries/AP_Arming/AP_Arming.cpp

@ -113,8 +113,7 @@ bool AP_Arming::compass_checks(bool report) @@ -113,8 +113,7 @@ bool AP_Arming::compass_checks(bool report)
return false;
}
// check compass learning is on or offsets have been set
Vector3f offsets = compass->get_offsets();
if(!compass->_learn && offsets.length() == 0) {
if (!compass.learn_offsets_enabled() && !compass.configured()) {
if (report) {
gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: Compass not calibrated"));
}

Loading…
Cancel
Save