AP_Periph: removed PWM count check for servos

actuator IDs are tied to OUTn_FUNCTION, not to physical output IDs, so
it is perfectly possible for an actuator ID to be larger than the
number of PWM outputs on the board
This commit is contained in:
Andrew Tridgell 2021-12-06 13:26:33 +11:00
parent b916e8cceb
commit 62b03bd1f1
1 changed files with 0 additions and 5 deletions

View File

@ -88,11 +88,6 @@ void AP_Periph_FW::rcout_esc(int16_t *rc, uint8_t num_channels)
void AP_Periph_FW::rcout_srv(uint8_t actuator_id, const float command_value)
{
#if HAL_PWM_COUNT > 0
if ((actuator_id == 0) || (actuator_id > HAL_PWM_COUNT)) {
// not supported or out of range
return;
}
const SRV_Channel::Aux_servo_function_t function = SRV_Channel::Aux_servo_function_t(SRV_Channel::k_rcin1 + actuator_id - 1);
SRV_Channels::set_output_norm(function, command_value);