Browse Source

Copter: add cork-push to esc calibration

Also remove unnecessary duplicate call to motors::set_throttle_passthrough_for_esc_calibration
mission-4.1.18
Randy Mackay 7 years ago
parent
commit
2af8e673cc
  1. 7
      ArduCopter/esc_calibration.cpp

7
ArduCopter/esc_calibration.cpp

@ -184,17 +184,18 @@ void Copter::esc_calibration_auto() @@ -184,17 +184,18 @@ void Copter::esc_calibration_auto()
// delay for 5 seconds while outputting pulses
uint32_t tstart = millis();
while (millis() - tstart < 5000) {
SRV_Channels::cork();
motors->set_throttle_passthrough_for_esc_calibration(1.0f);
SRV_Channels::push();
esc_calibration_notify();
delay(3);
}
// reduce throttle to minimum
motors->set_throttle_passthrough_for_esc_calibration(0.0f);
// block until we restart
while(1) {
SRV_Channels::cork();
motors->set_throttle_passthrough_for_esc_calibration(0.0f);
SRV_Channels::push();
esc_calibration_notify();
delay(3);
}

Loading…
Cancel
Save