diff --git a/src/boot.cpp b/src/boot.cpp index df2decb8..8b9a62b8 100644 --- a/src/boot.cpp +++ b/src/boot.cpp @@ -122,6 +122,8 @@ void start_boot_menu(void) { [&server]() { server.sendHeader("Connection", "close"); server.send(200, "text/plain", (Update.hasError()) ? "FAIL" : "OK"); + WiFi.disconnect(true, true); + do_reset(false); // coldstart }, [&server, &timer]() { HTTPUpload &upload = server.upload(); @@ -136,7 +138,6 @@ void start_boot_menu(void) { #else if (!Update.begin(UPDATE_SIZE_UNKNOWN)) { #endif - ESP_LOGE(TAG, "Error: %s", Update.errorString()); } } else if (upload.status == UPLOAD_FILE_WRITE) { @@ -150,10 +151,8 @@ void start_boot_menu(void) { true)) { // true to set the size to the current progress ESP_LOGI(TAG, "Update finished, %u bytes written", upload.totalSize); - WiFi.disconnect(true, true); - do_reset(false); // coldstart } else { - ESP_LOGE(TAG, "Update failed"); + ESP_LOGE(TAG, "Update failed, status=%d", upload.status); } } }); diff --git a/src/display.cpp b/src/display.cpp index f0cc189f..e756ab47 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -160,7 +160,6 @@ void dp_init(bool verbose) { delay(8000); #endif dp_contrast(DISPLAYCONTRAST); - //dp_clear(); #endif // HAS_LORA } // verbose