From 7b903268882126bdb8812380aa752f51bc987d23 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 13 Dec 2021 12:24:49 +1100 Subject: [PATCH] AP_Vehicle: declare get_control_output only if scripting is enabled It's right there in the comments - this should only be defined if scripting is enabled. Rover overrides this but that is protected by AP_SCRIPTING_ENABLED. --- libraries/AP_Vehicle/AP_Vehicle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Vehicle/AP_Vehicle.h b/libraries/AP_Vehicle/AP_Vehicle.h index adccf8bb54..dff45d02ae 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.h +++ b/libraries/AP_Vehicle/AP_Vehicle.h @@ -219,8 +219,6 @@ public: virtual bool nav_script_time(uint16_t &id, uint8_t &cmd, float &arg1, float &arg2) { return false; } virtual void nav_script_time_done(uint16_t id) {} -#endif // AP_SCRIPTING_ENABLED - // control outputs enumeration enum class ControlOutput { @@ -239,6 +237,8 @@ public: // returns true on success and control_value is set to a value in the range -1 to +1 virtual bool get_control_output(AP_Vehicle::ControlOutput control_output, float &control_value) { return false; } +#endif // AP_SCRIPTING_ENABLED + // write out harmonic notch log messages void write_notch_log_messages() const; // update the harmonic notch