Browse Source

Copter: add MOT_PWM param conversion

gps-1.3.1
Iampete1 3 years ago committed by Randy Mackay
parent
commit
12c1b3e8f5
  1. 7
      ArduCopter/radio.cpp

7
ArduCopter/radio.cpp

@ -51,6 +51,13 @@ void Copter::init_rc_out() @@ -51,6 +51,13 @@ void Copter::init_rc_out()
motors->set_update_rate(g.rc_speed);
#if FRAME_CONFIG != HELI_FRAME
if (channel_throttle->configured_in_storage()) {
// throttle inputs setup, use those to set motor PWM min and max if not already configured
motors->convert_pwm_min_max_param(channel_throttle->get_radio_min(), channel_throttle->get_radio_max());
} else {
// throttle inputs default, force set motor PWM min and max to defaults so they will not be over-written by a future change in RC min / max
motors->convert_pwm_min_max_param(1000, 2000);
}
motors->update_throttle_range();
#else
// setup correct scaling for ESCs like the UAVCAN ESCs which

Loading…
Cancel
Save