AP_Arming: add and use HAL_BUTTON_ENABLE

This commit is contained in:
Peter Barker 2021-08-12 13:38:17 +10:00 committed by Andrew Tridgell
parent 3ead096329
commit 4ae3ad555d

View File

@ -876,11 +876,13 @@ bool AP_Arming::system_checks(bool report)
return false;
}
#endif
#if HAL_BUTTON_ENABLED
const auto &button = AP::button();
if (!button.arming_checks(sizeof(buffer), buffer)) {
check_failed(ARMING_CHECK_PARAMETERS, report, "%s", buffer);
return false;
}
#endif
}
return true;