From def3bb374fe72f91e0db0c1b131867771ddf80ed Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 6 May 2019 11:15:32 +1000 Subject: [PATCH] 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. --- APMrover2/AP_Arming.cpp | 13 +++++++++++++ APMrover2/AP_Arming.h | 1 + 2 files changed, 14 insertions(+) diff --git a/APMrover2/AP_Arming.cpp b/APMrover2/AP_Arming.cpp index a0ee05fe46..2048dc5622 100644 --- a/APMrover2/AP_Arming.cpp +++ b/APMrover2/AP_Arming.cpp @@ -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) { diff --git a/APMrover2/AP_Arming.h b/APMrover2/AP_Arming.h index b7c48d817d..e52349cb9b 100644 --- a/APMrover2/AP_Arming.h +++ b/APMrover2/AP_Arming.h @@ -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;