mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2025-12-06 16:53:30 +08:00
Blimp: 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:
committed by
Thomas Watson
parent
edd333b891
commit
41b46bf804
@@ -30,7 +30,7 @@ bool AP_Arming_Blimp::run_pre_arm_checks(bool display_failure)
|
||||
}
|
||||
|
||||
// if pre arm checks are disabled run only the mandatory checks
|
||||
if (checks_to_perform == 0) {
|
||||
if (should_skip_all_checks()) {
|
||||
return mandatory_checks(display_failure);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ bool AP_Arming_Blimp::arm_checks(AP_Arming::Method method)
|
||||
return AP_Arming::arm_checks(method);
|
||||
}
|
||||
|
||||
// mandatory checks that will be run if ARMING_CHECK is zero or arming forced
|
||||
// mandatory checks that will be run if ARMING_SKIPCHK skips all or arming forced
|
||||
bool AP_Arming_Blimp::mandatory_checks(bool display_failure)
|
||||
{
|
||||
// call mandatory gps checks and update notify status because regular gps checks will not run
|
||||
|
||||
@@ -29,7 +29,7 @@ protected:
|
||||
bool pre_arm_ekf_attitude_check();
|
||||
bool arm_checks(AP_Arming::Method method) override;
|
||||
|
||||
// mandatory checks that cannot be bypassed. This function will only be called if ARMING_CHECK is zero or arming forced
|
||||
// mandatory checks that cannot be bypassed. This function will only be called if ARMING_SKIPCHK skips all or arming forced
|
||||
bool mandatory_checks(bool display_failure) override;
|
||||
|
||||
// NOTE! the following check functions *DO* call into AP_Arming:
|
||||
|
||||
Reference in New Issue
Block a user