From 1a0d51495dda8d54b237501c1a7cc2ce8a86c3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 8 Dec 2022 17:17:48 +0100 Subject: [PATCH] show appropriate message when going into OTA mode --- src/graphics/Screen.cpp | 6 +----- src/modules/AdminModule.cpp | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index eac78dd64..b5a3ac4d5 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -329,11 +329,7 @@ static void drawFrameFirmware(OLEDDisplay *display, OLEDDisplayUiState *state, i display->drawString(64 + x, y, "Updating"); display->setFont(FONT_SMALL); - if ((millis() / 1000) % 2) { - display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, "Please wait . . ."); - } else { - display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, "Please wait . . "); - } + display->drawStringMaxWidth(0 + x, 2 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), "Please be patient and do not power off."); } /// Draw the last text message we received diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index 434a42972..0b617adea 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -112,12 +112,15 @@ bool AdminModule::handleReceivedProtobuf(const MeshPacket &mp, AdminMessage *r) #ifdef ARCH_ESP32 if (BleOta::getOtaAppVersion().isEmpty()) { DEBUG_MSG("No OTA firmware available, scheduling regular reboot in %d seconds\n", s); + screen->startRebootScreen(); }else{ + screen->startFirmwareUpdateScreen(); BleOta::switchToOtaApp(); DEBUG_MSG("Rebooting to OTA in %d seconds\n", s); } #else DEBUG_MSG("Not on ESP32, scheduling regular reboot in %d seconds\n", s); + screen->startRebootScreen(); #endif rebootAtMsec = (s < 0) ? 0 : (millis() + s * 1000); break;