mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_ExternalAHRS: Check backend pre-arm before origin
* This allows the backend to report more detailed errors * Before this, many pre-arm errors were hidden by origin failure * If pre-arm could report multiple errors, that would be ideal Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
parent
a0939dd518
commit
e7b934dacd
@ -235,11 +235,14 @@ bool AP_ExternalAHRS::pre_arm_check(char *failure_msg, uint8_t failure_msg_len)
|
|||||||
hal.util->snprintf(failure_msg, failure_msg_len, "ExternalAHRS: Invalid backend");
|
hal.util->snprintf(failure_msg, failure_msg_len, "ExternalAHRS: Invalid backend");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!backend->pre_arm_check(failure_msg, failure_msg_len)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!state.have_origin) {
|
if (!state.have_origin) {
|
||||||
hal.util->snprintf(failure_msg, failure_msg_len, "ExternalAHRS: No origin");
|
hal.util->snprintf(failure_msg, failure_msg_len, "ExternalAHRS: No origin");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return backend->pre_arm_check(failure_msg, failure_msg_len);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user