Rover: move check for ARMING_CHECK_NONE back into Rover

Rover allows all prearm and arm checks to be bypassed with
ARMING_CHECK_NONE.  Not all vehicles allow this, so move this bypass
back into Rover.
This commit is contained in:
Peter Barker 2019-05-06 11:15:32 +10:00 committed by Randy Mackay
parent e340873d88
commit def3bb374f
2 changed files with 14 additions and 0 deletions

View File

@ -81,6 +81,10 @@ bool AP_Arming_Rover::gps_checks(bool display_failure)
bool AP_Arming_Rover::pre_arm_checks(bool report)
{
//are arming checks disabled?
if (checks_to_perform == ARMING_CHECK_NONE) {
return true;
}
if (SRV_Channels::get_emergency_stop()) {
check_failed(ARMING_CHECK_NONE, report, "Motors Emergency Stopped");
return false;
@ -92,6 +96,15 @@ bool AP_Arming_Rover::pre_arm_checks(bool report)
& proximity_check(report));
}
bool AP_Arming_Rover::arm_checks(AP_Arming::Method method)
{
//are arming checks disabled?
if (checks_to_perform == ARMING_CHECK_NONE) {
return true;
}
return AP_Arming::arm_checks(method);
}
// check nothing is too close to vehicle
bool AP_Arming_Rover::proximity_check(bool report)
{

View File

@ -17,6 +17,7 @@ public:
AP_Arming_Rover &operator=(const AP_Arming_Rover&) = delete;
bool pre_arm_checks(bool report) override;
bool arm_checks(AP_Arming::Method method) override;
bool pre_arm_rc_checks(const bool display_failure);
bool gps_checks(bool display_failure) override;