From 8b526526c2feb136534779f5a17737f9c1a2ba00 Mon Sep 17 00:00:00 2001 From: Shiv Tyagi Date: Sat, 30 Oct 2021 21:19:51 +0530 Subject: [PATCH] Copter: remove pilot_throttle_checks() This method is redundant as throttle below FS_THR_THROTTLE value is already checked in set_throttle_and_failsafe() method. --- ArduCopter/AP_Arming.cpp | 20 -------------------- ArduCopter/AP_Arming.h | 1 - 2 files changed, 21 deletions(-) diff --git a/ArduCopter/AP_Arming.cpp b/ArduCopter/AP_Arming.cpp index 096cdeb9af..8430b030ec 100644 --- a/ArduCopter/AP_Arming.cpp +++ b/ArduCopter/AP_Arming.cpp @@ -58,7 +58,6 @@ bool AP_Arming_Copter::run_pre_arm_checks(bool display_failure) return parameter_checks(display_failure) & motor_checks(display_failure) - & pilot_throttle_checks(display_failure) & oa_checks(display_failure) & gcs_failsafe_check(display_failure) & winch_checks(display_failure) @@ -344,25 +343,6 @@ bool AP_Arming_Copter::motor_checks(bool display_failure) return true; } -bool AP_Arming_Copter::pilot_throttle_checks(bool display_failure) -{ - // check throttle is above failsafe throttle - // this is near the bottom to allow other failures to be displayed before checking pilot throttle - if ((checks_to_perform == ARMING_CHECK_ALL) || (checks_to_perform & ARMING_CHECK_RC)) { - if (copter.g.failsafe_throttle != FS_THR_DISABLED && copter.channel_throttle->get_radio_in() < copter.g.failsafe_throttle_value) { - #if FRAME_CONFIG == HELI_FRAME - const char *failmsg = "Collective below Failsafe"; - #else - const char *failmsg = "Throttle below Failsafe"; - #endif - check_failed(ARMING_CHECK_RC, display_failure, "%s", failmsg); - return false; - } - } - - return true; -} - bool AP_Arming_Copter::oa_checks(bool display_failure) { #if AC_OAPATHPLANNER_ENABLED == ENABLED diff --git a/ArduCopter/AP_Arming.h b/ArduCopter/AP_Arming.h index 28f3c58233..ae705b70e4 100644 --- a/ArduCopter/AP_Arming.h +++ b/ArduCopter/AP_Arming.h @@ -45,7 +45,6 @@ protected: // NOTE! the following check functions *DO NOT* call into AP_Arming! bool parameter_checks(bool display_failure); bool motor_checks(bool display_failure); - bool pilot_throttle_checks(bool display_failure); bool oa_checks(bool display_failure); bool mandatory_gps_checks(bool display_failure); bool gcs_failsafe_check(bool display_failure);