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.
This commit is contained in:
parent
170ca89a21
commit
76369d153f
@ -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…
Reference in New Issue
Block a user