mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
AP_Arming: add mandatory_checks
These are checks that can never be bypassed
This commit is contained in:
parent
e68ee6f86e
commit
e28f258297
@ -872,7 +872,7 @@ bool AP_Arming::arm(AP_Arming::Method method, const bool do_arming_checks)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!do_arming_checks || (pre_arm_checks(true) && arm_checks(method))) {
|
||||
if ((!do_arming_checks && mandatory_checks(true)) || (pre_arm_checks(true) && arm_checks(method))) {
|
||||
armed = true;
|
||||
|
||||
//TODO: Log motor arming
|
||||
|
@ -133,6 +133,9 @@ protected:
|
||||
bool servo_checks(bool report) const;
|
||||
bool rc_checks_copter_sub(bool display_failure, const RC_Channel *channels[4]) const;
|
||||
|
||||
// mandatory checks that cannot be bypassed. This function will only be called if ARMING_CHECK is zero or arming forced
|
||||
virtual bool mandatory_checks(bool report) { return true; }
|
||||
|
||||
// returns true if a particular check is enabled
|
||||
bool check_enabled(const enum AP_Arming::ArmingChecks check) const;
|
||||
// returns a mavlink severity which should be used if a specific check fails
|
||||
|
Loading…
Reference in New Issue
Block a user