From a88c3a08b04202bde12fd00b5387daa32fcf00b7 Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Mon, 26 Jun 2023 11:07:45 -0700 Subject: [PATCH] Copter: is_landing/is_taking_off not to req scripting --- ArduCopter/Copter.cpp | 4 ++-- ArduCopter/Copter.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ArduCopter/Copter.cpp b/ArduCopter/Copter.cpp index b9d47f9afe..f7a0f44871 100644 --- a/ArduCopter/Copter.cpp +++ b/ArduCopter/Copter.cpp @@ -445,6 +445,8 @@ 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 { @@ -457,8 +459,6 @@ 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 6c25a32898..3afe7f0f4b 100644 --- a/ArduCopter/Copter.h +++ b/ArduCopter/Copter.h @@ -679,9 +679,9 @@ private: // 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);