Skip to content

Commit 6bd943f

Browse files
committed
SRV_Channels: gate method on scripting being enabled
also AP_Scheduler since we're calling and instance method on it
1 parent 313cfec commit 6bd943f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/SRV_Channel/SRV_Channels.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ void SRV_Channels::set_output_pwm_chan(uint8_t chan, uint16_t value)
474474
}
475475
}
476476

477+
#if AP_SCRIPTING_ENABLED && AP_SCHEDULER_ENABLED
477478
// set output value for a specific function channel as a pwm value with loop based timeout
478479
// timeout_ms of zero will clear override of the channel
479480
// 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
499500
}
500501
}
501502
}
503+
#endif // AP_SCRIPTING_ENABLED
502504

503505
/*
504506
wrapper around hal.rcout->cork()

0 commit comments

Comments
 (0)