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.
This commit is contained in:
Randy Mackay 2017-01-26 12:41:33 +09:00
parent a25f51c893
commit 6726d94537

View File

@ -93,10 +93,16 @@ void Copter::esc_calibration_passthrough()
// arm motors // arm motors
motors->armed(true); motors->armed(true);
motors->enable(); motors->enable();
uint32_t last_notify_update_ms = 0;
while(1) { while(1) {
// flash LEDS // flash LEDS
AP_Notify::flags.esc_calibration = true; 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 pilot input
read_radio(); read_radio();