Browse Source

Copter: update notify during ESC calibration

The notify devices including the RGB were not being updated meaning the main LED was normally frozen or off during calibration.  The desired behaviour is that it flashes red, blue, yellow.
mission-4.1.18
Randy Mackay 8 years ago
parent
commit
6726d94537
  1. 6
      ArduCopter/esc_calibration.cpp

6
ArduCopter/esc_calibration.cpp

@ -94,9 +94,15 @@ void Copter::esc_calibration_passthrough() @@ -94,9 +94,15 @@ void Copter::esc_calibration_passthrough()
motors->armed(true);
motors->enable();
uint32_t last_notify_update_ms = 0;
while(1) {
// flash LEDS
AP_Notify::flags.esc_calibration = true;
uint32_t now = AP_HAL::millis();
if (now - last_notify_update_ms > 20) {
last_notify_update_ms = now;
update_notify();
}
// read pilot input
read_radio();

Loading…
Cancel
Save