Rover: use check_enabked hepler to always check if all bit is set

This commit is contained in:
Iampete1 2023-01-21 13:30:08 +00:00 committed by Andrew Tridgell
parent 31ba715616
commit 65a2ec5b6a

View File

@ -5,7 +5,7 @@
bool AP_Arming_Rover::rc_calibration_checks(const bool display_failure) bool AP_Arming_Rover::rc_calibration_checks(const bool display_failure)
{ {
// set rc-checks to success if RC checks are disabled // set rc-checks to success if RC checks are disabled
if ((checks_to_perform != ARMING_CHECK_ALL) && !(checks_to_perform & ARMING_CHECK_RC)) { if (!check_enabled(ARMING_CHECK_RC)) {
return true; return true;
} }
@ -180,7 +180,7 @@ bool AP_Arming_Rover::oa_check(bool report)
bool AP_Arming_Rover::parameter_checks(bool report) bool AP_Arming_Rover::parameter_checks(bool report)
{ {
// success if parameter checks are disabled // success if parameter checks are disabled
if ((checks_to_perform != ARMING_CHECK_ALL) && !(checks_to_perform & ARMING_CHECK_PARAMETERS)) { if (!check_enabled(ARMING_CHECK_PARAMETERS)) {
return true; return true;
} }