SRV_Channels: gate method on scripting being enabled

also AP_Scheduler since we're calling and instance method on it
This commit is contained in:
Peter Barker 2024-03-08 10:56:02 +11:00 committed by Peter Barker
parent ee038cdf1f
commit bf63729d31

View File

@ -474,6 +474,7 @@ void SRV_Channels::set_output_pwm_chan(uint8_t chan, uint16_t value)
} }
} }
#if AP_SCRIPTING_ENABLED && AP_SCHEDULER_ENABLED
// set output value for a specific function channel as a pwm value with loop based timeout // set output value for a specific function channel as a pwm value with loop based timeout
// timeout_ms of zero will clear override of the channel // timeout_ms of zero will clear override of the channel
// minimum override is 1 MAIN_LOOP // minimum override is 1 MAIN_LOOP
@ -499,6 +500,7 @@ void SRV_Channels::set_output_pwm_chan_timeout(uint8_t chan, uint16_t value, uin
} }
} }
} }
#endif // AP_SCRIPTING_ENABLED
/* /*
wrapper around hal.rcout->cork() wrapper around hal.rcout->cork()