AP_Arming: use baro arming checks call

This commit is contained in:
Andrew Tridgell 2022-10-16 21:52:52 +11:00
parent 13893d3ed5
commit b96677c70d

View File

@ -264,8 +264,9 @@ bool AP_Arming::barometer_checks(bool report)
#endif
if ((checks_to_perform & ARMING_CHECK_ALL) ||
(checks_to_perform & ARMING_CHECK_BARO)) {
if (!AP::baro().all_healthy()) {
check_failed(ARMING_CHECK_BARO, report, "Barometer not healthy");
char buffer[MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN+1] {};
if (!AP::baro().arming_checks(sizeof(buffer), buffer)) {
check_failed(ARMING_CHECK_BARO, report, "Baro: %s", buffer);
return false;
}
}