Skip to content

Commit

Permalink
SRV_Channels: gate method on scripting being enabled
Browse files Browse the repository at this point in the history
also AP_Scheduler since we're calling and instance method on it
  • Loading branch information
peterbarker committed Apr 17, 2024
1 parent ee038cd commit bf63729
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/SRV_Channel/SRV_Channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
// timeout_ms of zero will clear override of the channel
// minimum override is 1 MAIN_LOOP
Expand All @@ -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()
Expand Down

0 comments on commit bf63729

Please sign in to comment.