Browse Source

Copter: fixed ESC calibration on PixRacer

we need to set the ESC scaling before we go into the calibration loop
or the outputs will never arm
mission-4.1.18
Andrew Tridgell 9 years ago
parent
commit
146a59eed3
  1. 8
      ArduCopter/radio.cpp

8
ArduCopter/radio.cpp

@ -70,6 +70,10 @@ void Copter::init_rc_out() @@ -70,6 +70,10 @@ void Copter::init_rc_out()
// we want the input to be scaled correctly
channel_throttle->set_range_out(0,1000);
// setup correct scaling for ESCs like the UAVCAN PX4ESC which
// take a proportion of speed.
hal.rcout->set_esc_scaling(channel_throttle->get_radio_min(), channel_throttle->get_radio_max());
// check if we should enter esc calibration mode
esc_calibration_startup_check();
@ -81,10 +85,6 @@ void Copter::init_rc_out() @@ -81,10 +85,6 @@ void Copter::init_rc_out()
// refresh auxiliary channel to function map
RC_Channel_aux::update_aux_servo_function();
// setup correct scaling for ESCs like the UAVCAN PX4ESC which
// take a proportion of speed.
hal.rcout->set_esc_scaling(channel_throttle->get_radio_min(), channel_throttle->get_radio_max());
}
// enable_motor_output() - enable and output lowest possible value to motors

Loading…
Cancel
Save