From cc8912255ed2908b8203df9c5e7769f4b3e682a1 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 6 Mar 2019 10:10:15 +1100 Subject: [PATCH] Copter: move checking of fence up --- ArduCopter/AP_Arming.cpp | 17 ----------------- ArduCopter/AP_Arming.h | 1 - 2 files changed, 18 deletions(-) diff --git a/ArduCopter/AP_Arming.cpp b/ArduCopter/AP_Arming.cpp index 8b70ad4318..0c5c90802b 100644 --- a/ArduCopter/AP_Arming.cpp +++ b/ArduCopter/AP_Arming.cpp @@ -100,23 +100,6 @@ bool AP_Arming_Copter::compass_checks(bool display_failure) return ret; } -bool AP_Arming_Copter::fence_checks(bool display_failure) -{ - #if AC_FENCE == ENABLED - // check fence is initialised - const char *fail_msg = nullptr; - if (!copter.fence.pre_arm_check(fail_msg)) { - if (fail_msg == nullptr) { - check_failed(ARMING_CHECK_NONE, display_failure, "Check fence"); - } else { - check_failed(ARMING_CHECK_NONE, display_failure, "%s", fail_msg); - } - return false; - } - #endif - return true; -} - bool AP_Arming_Copter::ins_checks(bool display_failure) { bool ret = AP_Arming::ins_checks(display_failure); diff --git a/ArduCopter/AP_Arming.h b/ArduCopter/AP_Arming.h index c50a5c853a..38f96d829d 100644 --- a/ArduCopter/AP_Arming.h +++ b/ArduCopter/AP_Arming.h @@ -40,7 +40,6 @@ protected: bool board_voltage_checks(bool display_failure) override; // NOTE! the following check functions *DO NOT* call into AP_Arming! - bool fence_checks(bool display_failure); bool parameter_checks(bool display_failure); bool motor_checks(bool display_failure); bool pilot_throttle_checks(bool display_failure);