From 37b4a050e24a161a319bd5fd0c91e56137ac9b6e Mon Sep 17 00:00:00 2001 From: muramura Date: Sat, 27 Apr 2024 20:16:22 +0900 Subject: [PATCH] Copter: Constant comparisons are made first --- ArduCopter/AP_Arming.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/AP_Arming.cpp b/ArduCopter/AP_Arming.cpp index 4fbfe125ccd302..372095536865a9 100644 --- a/ArduCopter/AP_Arming.cpp +++ b/ArduCopter/AP_Arming.cpp @@ -193,7 +193,7 @@ bool AP_Arming_Copter::parameter_checks(bool display_failure) // failsafe parameter checks if (copter.g.failsafe_throttle) { // check throttle min is above throttle failsafe trigger and that the trigger is above ppm encoder's loss-of-signal value of 900 - if (copter.channel_throttle->get_radio_min() <= copter.g.failsafe_throttle_value+10 || copter.g.failsafe_throttle_value < 910) { + if (copter.g.failsafe_throttle_value < 910 || copter.channel_throttle->get_radio_min() <= copter.g.failsafe_throttle_value+10) { check_failed(ARMING_CHECK_PARAMETERS, display_failure, "Check FS_THR_VALUE"); return false; }