From debdc3de7c319c0fdb91185e1d7d7b99c2295942 Mon Sep 17 00:00:00 2001 From: muramura Date: Sun, 2 Jun 2024 17:09:24 +0900 Subject: [PATCH] Copter: Change the range of the preprocessor --- ArduCopter/Copter.cpp | 4 ++-- ArduCopter/Copter.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ArduCopter/Copter.cpp b/ArduCopter/Copter.cpp index 38aabd23dbf15c..742319075b863e 100644 --- a/ArduCopter/Copter.cpp +++ b/ArduCopter/Copter.cpp @@ -446,8 +446,6 @@ bool Copter::has_ekf_failsafed() const return failsafe.ekf; } -#endif // AP_SCRIPTING_ENABLED - // returns true if vehicle is landing. Only used by Lua scripts bool Copter::is_landing() const { @@ -460,6 +458,8 @@ bool Copter::is_taking_off() const return flightmode->is_taking_off(); } +#endif // AP_SCRIPTING_ENABLED + bool Copter::current_mode_requires_mission() const { #if MODE_AUTO_ENABLED == ENABLED diff --git a/ArduCopter/Copter.h b/ArduCopter/Copter.h index 026faaa7d5cd99..c81e28576bdbce 100644 --- a/ArduCopter/Copter.h +++ b/ArduCopter/Copter.h @@ -686,9 +686,10 @@ class Copter : public AP_Vehicle { // lua scripts use this to retrieve EKF failsafe state // returns true if the EKF failsafe has triggered bool has_ekf_failsafed() const override; -#endif // AP_SCRIPTING_ENABLED + bool is_landing() const override; bool is_taking_off() const override; +#endif // AP_SCRIPTING_ENABLED void rc_loop(); void throttle_loop(); void update_batt_compass(void);