AP_Arming: 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 923520d455
commit fc7804f03a

View File

@ -1632,7 +1632,7 @@ AP_Arming::Required AP_Arming::arming_required()
bool AP_Arming::rc_checks_copter_sub(const bool display_failure, const RC_Channel *channels[4]) const
{
// 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;
}
@ -1676,7 +1676,7 @@ bool AP_Arming::rc_checks_copter_sub(const bool display_failure, const RC_Channe
// check visual odometry is working
bool AP_Arming::visodom_checks(bool display_failure) const
{
if ((checks_to_perform != ARMING_CHECK_ALL) && !(checks_to_perform & ARMING_CHECK_VISION)) {
if (!check_enabled(ARMING_CHECK_VISION)) {
return true;
}