mirror of https://github.com/ArduPilot/ardupilot
Sub: integrate ahrs.pre_arm_check
This commit is contained in:
parent
161d235c8b
commit
facc0ea8bb
|
@ -65,12 +65,9 @@ bool AP_Arming_Sub::ins_checks(bool display_failure)
|
|||
// additional sub-specific checks
|
||||
if ((checks_to_perform & ARMING_CHECK_ALL) ||
|
||||
(checks_to_perform & ARMING_CHECK_INS)) {
|
||||
if (!AP::ahrs().prearm_healthy()) {
|
||||
const char *reason = AP::ahrs().prearm_failure_reason();
|
||||
if (reason == nullptr) {
|
||||
reason = "AHRS not healthy";
|
||||
}
|
||||
check_failed(ARMING_CHECK_INS, display_failure, "%s", reason);
|
||||
char failure_msg[50] = {};
|
||||
if (!AP::ahrs().pre_arm_check(failure_msg, sizeof(failure_msg))) {
|
||||
check_failed(ARMING_CHECK_INS, display_failure, "AHRS: %s", failure_msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue