From de615b3738e3ea231193059bff09f3f3b75d1e91 Mon Sep 17 00:00:00 2001 From: Hieromon Ikasamo Date: Mon, 13 Apr 2020 16:37:32 +0900 Subject: [PATCH] Changed to include Update.h certainly --- src/AutoConnectOTA.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/AutoConnectOTA.cpp b/src/AutoConnectOTA.cpp index 3bc5fef..116fd41 100644 --- a/src/AutoConnectOTA.cpp +++ b/src/AutoConnectOTA.cpp @@ -10,6 +10,7 @@ #include #if defined(ARDUINO_ARCH_ESP8266) #include +#include #elif defined(ARDUINO_ARCH_ESP32) #include #endif @@ -205,11 +206,10 @@ String AutoConnectOTA::_updated(AutoConnectAux& result, PageArgument& args) { result["bin"].as().style += String(stColor); result["result"].as().value = st; - // The rc element on the result page has an update return code - // which is a hidden field. - // By setting the error code of the Update class into its field, - // the homepage after reboot will automatically GET by the JavaScript - // on the result page. + // AutoConnectOTA result page generates a transition after reboot + // according to the error code from the Update class. By setting the + // error code of the Update class into the rc element, this page will + // automatically GET the homepage of the updated sketch. result["rc"].value.replace("%d", String(Update.getError())); return String(""); }