Rover: turn ARMING_CHECK into ARMING_SKIPCHK

This lowers the effort required to turn off just one arming check.
Previously, a user had to disable the ALL bit and enable every check
except the undesired one. Now they can just disable that one directly.
Hopefully this will result in less vehicles with no arming checks
whatsoever, presuming only one check is giving the user grief.

This, as a side effect, removes the difference between the ALL bit set
and all non-ALL bits set (e.g. the latter disables IMU heater checks).
It also ensures the user will get any new arming checks even if they
have skipped one.

People who need to disable all current and future checks for e.g. bench
testing can still do this efficiently by setting the parameter to `-1`,
leveraging that this sets all bits in 2s complement arithmetic.

A parameter conversion is included that skips no checks if the old ALL
bit is set; otherwise it migrates the user's selected checks. If no
checks were enabled, it disables all current and future checks.
This commit is contained in:
Thomas Watson 2025-12-02 21:30:30 -06:00 committed by Thomas Watson
parent 41b46bf804
commit 39e957b9ca

View File

@ -83,8 +83,8 @@ bool AP_Arming_Rover::pre_arm_checks(bool report)
return false;
}
//are arming checks disabled?
if (checks_to_perform == 0) {
// are arming checks disabled?
if (should_skip_all_checks()) {
return mandatory_checks(report);
}
@ -115,8 +115,8 @@ bool AP_Arming_Rover::arm_checks(AP_Arming::Method method)
}
}
//are arming checks disabled?
if (checks_to_perform == 0) {
// are arming checks disabled?
if (should_skip_all_checks()) {
return true;
}
return AP_Arming::arm_checks(method);