Browse Source

Sub: integrate ahrs.pre_arm_check

zr-v5.1
Randy Mackay 5 years ago committed by Peter Barker
parent
commit
facc0ea8bb
  1. 9
      ArduSub/AP_Arming_Sub.cpp

9
ArduSub/AP_Arming_Sub.cpp

@ -65,12 +65,9 @@ bool AP_Arming_Sub::ins_checks(bool display_failure) @@ -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…
Cancel
Save