From 808d2b533db5ca8d1866bed23aaf479622ebaa75 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Fri, 29 Nov 2019 00:28:08 +0300 Subject: [PATCH] ota: arduinoota reboots after end callback --- code/espurna/ota_arduinoota.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/espurna/ota_arduinoota.ino b/code/espurna/ota_arduinoota.ino index 78664421..7b6d5e91 100644 --- a/code/espurna/ota_arduinoota.ino +++ b/code/espurna/ota_arduinoota.ino @@ -48,7 +48,10 @@ void _arduinoOtaOnEnd() { #if WEB_SUPPORT wsSend_P(PSTR("{\"action\": \"reload\"}")); #endif - deferredReset(100, CUSTOM_RESET_OTA); + + // Note: ArduinoOTA will reset the board after this callback returns. + customResetReason(CUSTOM_RESET_OTA); + nice_delay(100); }