From 6726d94537277867adb024d32fb4f5642fc7bbfb Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 26 Jan 2017 12:41:33 +0900 Subject: [PATCH] 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. --- ArduCopter/esc_calibration.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ArduCopter/esc_calibration.cpp b/ArduCopter/esc_calibration.cpp index 3e3bf59097..9eaeaaf114 100644 --- a/ArduCopter/esc_calibration.cpp +++ b/ArduCopter/esc_calibration.cpp @@ -93,10 +93,16 @@ void Copter::esc_calibration_passthrough() // arm motors 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();