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.
This commit is contained in:
Peter Barker 2021-12-13 12:24:49 +11:00 committed by Andrew Tridgell
parent 7c126b1e7b
commit 7b90326888

View File

@ -219,8 +219,6 @@ public:
virtual bool nav_script_time(uint16_t &id, uint8_t &cmd, float &arg1, float &arg2) { return false; } 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) {} virtual void nav_script_time_done(uint16_t id) {}
#endif // AP_SCRIPTING_ENABLED
// control outputs enumeration // control outputs enumeration
enum class ControlOutput { 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 // 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; } 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 // write out harmonic notch log messages
void write_notch_log_messages() const; void write_notch_log_messages() const;
// update the harmonic notch // update the harmonic notch