From 552df4c88c17410e83a54dd08e83fa62d3a41de6 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 14 Jan 2026 07:06:40 -0600 Subject: [PATCH] Supress reboot banner in Reboot OTA --- src/graphics/Screen.cpp | 2 +- src/main.cpp | 5 +++-- src/main.h | 1 + src/modules/AdminModule.cpp | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 28f17f962..8bf69b7a0 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -825,7 +825,7 @@ int32_t Screen::runOnce() #endif } #endif - if (!NotificationRenderer::isOverlayBannerShowing() && rebootAtMsec != 0) { + if (!NotificationRenderer::isOverlayBannerShowing() && rebootAtMsec != 0 && !suppressRebootBanner) { showSimpleBanner("Rebooting...", 0); } diff --git a/src/main.cpp b/src/main.cpp index d77767736..7e6488bd8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1541,8 +1541,9 @@ void setup() } #endif -uint32_t rebootAtMsec; // If not zero we will reboot at this time (used to reboot shortly after the update completes) -uint32_t shutdownAtMsec; // If not zero we will shutdown at this time (used to shutdown from python or mobile client) +uint32_t rebootAtMsec; // If not zero we will reboot at this time (used to reboot shortly after the update completes) +uint32_t shutdownAtMsec; // If not zero we will shutdown at this time (used to shutdown from python or mobile client) +bool suppressRebootBanner; // If true, suppress "Rebooting..." overlay (used for OTA handoff) // If a thread does something that might need for it to be rescheduled ASAP it can set this flag // This will suppress the current delay and instead try to run ASAP. diff --git a/src/main.h b/src/main.h index 7ca14d825..c3528a63d 100644 --- a/src/main.h +++ b/src/main.h @@ -81,6 +81,7 @@ extern uint32_t timeLastPowered; extern uint32_t rebootAtMsec; extern uint32_t shutdownAtMsec; +extern bool suppressRebootBanner; extern uint32_t serialSinceMsec; diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index 5eac64a62..4d1ebd931 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -241,6 +241,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta #if defined(ARCH_ESP32) #if !MESHTASTIC_EXCLUDE_BLUETOOTH if (!BleOta::getOtaAppVersion().isEmpty()) { + suppressRebootBanner = true; if (screen) screen->startFirmwareUpdateScreen(); BleOta::switchToOtaApp(); @@ -249,6 +250,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta #endif #if !MESHTASTIC_EXCLUDE_WIFI if (WiFiOTA::trySwitchToOTA()) { + suppressRebootBanner = true; if (screen) screen->startFirmwareUpdateScreen(); WiFiOTA::saveConfig(&config.network);