From 00584833624bf016cacf0af7391ff061ab69bdd3 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Sun, 18 Jul 2021 18:36:36 +0100 Subject: [PATCH] Plane: #ifdef scripting specific functions --- ArduPlane/ArduPlane.cpp | 3 ++- ArduPlane/Plane.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ArduPlane/ArduPlane.cpp b/ArduPlane/ArduPlane.cpp index 1802dbcdc6..33639898bc 100644 --- a/ArduPlane/ArduPlane.cpp +++ b/ArduPlane/ArduPlane.cpp @@ -651,7 +651,7 @@ bool Plane::get_wp_crosstrack_error_m(float &xtrack_error) const return true; } - +#ifdef ENABLE_SCRIPTING // set target location (for use by scripting) bool Plane::set_target_location(const Location& target_loc) { @@ -689,5 +689,6 @@ bool Plane::get_target_location(Location& target_loc) } return false; } +#endif // ENABLE_SCRIPTING AP_HAL_MAIN_CALLBACKS(&plane); diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index c652f38033..b48f85044a 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -1141,8 +1141,11 @@ private: public: void failsafe_check(void); +#ifdef ENABLE_SCRIPTING bool set_target_location(const Location& target_loc) override; bool get_target_location(Location& target_loc) override; +#endif // ENABLE_SCRIPTING + }; extern Plane plane;