Browse Source

RC_Channel: set_radio() should not constrain values

caller is supplying direct PWM value. The MIN/MAX should not apply
master
Andrew Tridgell 9 years ago
parent
commit
120564f094
  1. 2
      libraries/RC_Channel/RC_Channel_aux.cpp

2
libraries/RC_Channel/RC_Channel_aux.cpp

@ -177,7 +177,7 @@ RC_Channel_aux::set_radio(RC_Channel_aux::Aux_servo_function_t function, int16_t @@ -177,7 +177,7 @@ RC_Channel_aux::set_radio(RC_Channel_aux::Aux_servo_function_t function, int16_t
}
for (uint8_t i = 0; i < RC_AUX_MAX_CHANNELS; i++) {
if (_aux_channels[i] && _aux_channels[i]->function.get() == function) {
_aux_channels[i]->set_radio_out(constrain_int16(value,_aux_channels[i]->get_radio_min(),_aux_channels[i]->get_radio_max()));
_aux_channels[i]->set_radio_out(value);
_aux_channels[i]->output();
}
}

Loading…
Cancel
Save