From 96ada44fa96b657f38dd79f329d137bda0bdedae Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Wed, 18 Sep 2019 17:51:38 +0300 Subject: [PATCH] ota: disable async mode when running arduino_ota --- code/espurna/ota_arduinoota.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/espurna/ota_arduinoota.ino b/code/espurna/ota_arduinoota.ino index 78664421aa..2b6721e908 100644 --- a/code/espurna/ota_arduinoota.ino +++ b/code/espurna/ota_arduinoota.ino @@ -30,6 +30,10 @@ void _arduinoOtaOnStart() { // Disabling EEPROM rotation to prevent writing to EEPROM after the upgrade eepromRotate(false); + // Avoid triggering wdt on write operations, allow implicit yield() calls + // (async mode could be enabled when using ota_base methods, currently used by web and asynctcp ota) + Update.runAsync(false); + // Because ArduinoOTA is synchronous, force backup right now instead of waiting for the next loop() eepromBackup(0); @@ -55,7 +59,7 @@ void _arduinoOtaOnEnd() { void _arduinoOtaOnProgress(unsigned int progress, unsigned int total) { // Removed to avoid websocket ping back during upgrade (see #1574) - // TODO: implement as separate from debugging message + // TODO: implement as percentage progress message, separate from debug log? #if WEB_SUPPORT if (wsConnected()) return; #endif