From 9a5520a8111627b4e1f37698c14c0541b9dc82e9 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 15 Nov 2021 16:08:35 +1100 Subject: [PATCH] Rover: move from ENABLE_SCRIPTING to AP_SCRIPTING_ENABLED --- Rover/Parameters.cpp | 2 +- Rover/Parameters.h | 4 ++-- Rover/Rover.cpp | 4 ++-- Rover/Rover.h | 6 +++--- Rover/system.cpp | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Rover/Parameters.cpp b/Rover/Parameters.cpp index d166fb6a1b..42e03cd1f7 100644 --- a/Rover/Parameters.cpp +++ b/Rover/Parameters.cpp @@ -600,7 +600,7 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = { // @User: Standard AP_GROUPINFO("BAL_PITCH_TRIM", 40, ParametersG2, bal_pitch_trim, 0), -#if ENABLE_SCRIPTING +#if AP_SCRIPTING_ENABLED // @Group: SCR_ // @Path: ../libraries/AP_Scripting/AP_Scripting.cpp AP_SUBGROUPINFO(scripting, "SCR_", 41, ParametersG2, AP_Scripting), diff --git a/Rover/Parameters.h b/Rover/Parameters.h index ee4d341c86..efbd3254d3 100644 --- a/Rover/Parameters.h +++ b/Rover/Parameters.h @@ -383,9 +383,9 @@ public: // stick mixing for auto modes AP_Int8 stick_mixing; -#if ENABLE_SCRIPTING +#if AP_SCRIPTING_ENABLED AP_Scripting scripting; -#endif // ENABLE_SCRIPTING +#endif // AP_SCRIPTING_ENABLED // waypoint navigation AR_WPNav wp_nav; diff --git a/Rover/Rover.cpp b/Rover/Rover.cpp index ba6bdfda3c..85a2778d0e 100644 --- a/Rover/Rover.cpp +++ b/Rover/Rover.cpp @@ -139,7 +139,7 @@ Rover::Rover(void) : { } -#if ENABLE_SCRIPTING +#if AP_SCRIPTING_ENABLED // set target location (for use by scripting) bool Rover::set_target_location(const Location& target_loc) { @@ -218,7 +218,7 @@ bool Rover::get_control_output(AP_Vehicle::ControlOutput control_output, float & } return false; } -#endif // ENABLE_SCRIPTING +#endif // AP_SCRIPTING_ENABLED #if STATS_ENABLED == ENABLED /* diff --git a/Rover/Rover.h b/Rover/Rover.h index 0dfcfbd6bf..027a2712a5 100644 --- a/Rover/Rover.h +++ b/Rover/Rover.h @@ -72,7 +72,7 @@ #include #include -#if ENABLE_SCRIPTING +#if AP_SCRIPTING_ENABLED #include #endif @@ -266,12 +266,12 @@ private: private: // Rover.cpp -#if ENABLE_SCRIPTING +#if AP_SCRIPTING_ENABLED bool set_target_location(const Location& target_loc) override; bool set_target_velocity_NED(const Vector3f& vel_ned) override; bool set_steering_and_throttle(float steering, float throttle) override; bool get_control_output(AP_Vehicle::ControlOutput control_output, float &control_value) override; -#endif // ENABLE_SCRIPTING +#endif // AP_SCRIPTING_ENABLED void stats_update(); void ahrs_update(); void gcs_failsafe_check(void); diff --git a/Rover/system.cpp b/Rover/system.cpp index ba4e6d557b..fe6c02e40d 100644 --- a/Rover/system.cpp +++ b/Rover/system.cpp @@ -163,9 +163,9 @@ void Rover::startup_ground(void) ); #endif -#if ENABLE_SCRIPTING +#if AP_SCRIPTING_ENABLED g2.scripting.init(); -#endif // ENABLE_SCRIPTING +#endif // AP_SCRIPTING_ENABLED // we don't want writes to the serial port to cause us to pause // so set serial ports non-blocking once we are ready to drive