maintenance mode adjustments

This commit is contained in:
cyberman54 2021-03-05 20:09:35 +01:00
parent 88774d13e9
commit 7da22db833
2 changed files with 3 additions and 5 deletions

View File

@ -122,6 +122,8 @@ void start_boot_menu(void) {
[&server]() { [&server]() {
server.sendHeader("Connection", "close"); server.sendHeader("Connection", "close");
server.send(200, "text/plain", (Update.hasError()) ? "FAIL" : "OK"); server.send(200, "text/plain", (Update.hasError()) ? "FAIL" : "OK");
WiFi.disconnect(true, true);
do_reset(false); // coldstart
}, },
[&server, &timer]() { [&server, &timer]() {
HTTPUpload &upload = server.upload(); HTTPUpload &upload = server.upload();
@ -136,7 +138,6 @@ void start_boot_menu(void) {
#else #else
if (!Update.begin(UPDATE_SIZE_UNKNOWN)) { if (!Update.begin(UPDATE_SIZE_UNKNOWN)) {
#endif #endif
ESP_LOGE(TAG, "Error: %s", Update.errorString()); ESP_LOGE(TAG, "Error: %s", Update.errorString());
} }
} else if (upload.status == UPLOAD_FILE_WRITE) { } 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 true)) { // true to set the size to the current progress
ESP_LOGI(TAG, "Update finished, %u bytes written", ESP_LOGI(TAG, "Update finished, %u bytes written",
upload.totalSize); upload.totalSize);
WiFi.disconnect(true, true);
do_reset(false); // coldstart
} else { } else {
ESP_LOGE(TAG, "Update failed"); ESP_LOGE(TAG, "Update failed, status=%d", upload.status);
} }
} }
}); });

View File

@ -160,7 +160,6 @@ void dp_init(bool verbose) {
delay(8000); delay(8000);
#endif #endif
dp_contrast(DISPLAYCONTRAST); dp_contrast(DISPLAYCONTRAST);
//dp_clear();
#endif // HAS_LORA #endif // HAS_LORA
} // verbose } // verbose