Supress reboot banner in Reboot OTA
This commit is contained in:
@@ -825,7 +825,7 @@ int32_t Screen::runOnce()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!NotificationRenderer::isOverlayBannerShowing() && rebootAtMsec != 0) {
|
if (!NotificationRenderer::isOverlayBannerShowing() && rebootAtMsec != 0 && !suppressRebootBanner) {
|
||||||
showSimpleBanner("Rebooting...", 0);
|
showSimpleBanner("Rebooting...", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -1541,8 +1541,9 @@ void setup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
uint32_t rebootAtMsec; // If not zero we will reboot at this time (used to reboot shortly after the update completes)
|
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 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
|
// 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.
|
// This will suppress the current delay and instead try to run ASAP.
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ extern uint32_t timeLastPowered;
|
|||||||
|
|
||||||
extern uint32_t rebootAtMsec;
|
extern uint32_t rebootAtMsec;
|
||||||
extern uint32_t shutdownAtMsec;
|
extern uint32_t shutdownAtMsec;
|
||||||
|
extern bool suppressRebootBanner;
|
||||||
|
|
||||||
extern uint32_t serialSinceMsec;
|
extern uint32_t serialSinceMsec;
|
||||||
|
|
||||||
|
|||||||
@@ -241,6 +241,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
|
|||||||
#if defined(ARCH_ESP32)
|
#if defined(ARCH_ESP32)
|
||||||
#if !MESHTASTIC_EXCLUDE_BLUETOOTH
|
#if !MESHTASTIC_EXCLUDE_BLUETOOTH
|
||||||
if (!BleOta::getOtaAppVersion().isEmpty()) {
|
if (!BleOta::getOtaAppVersion().isEmpty()) {
|
||||||
|
suppressRebootBanner = true;
|
||||||
if (screen)
|
if (screen)
|
||||||
screen->startFirmwareUpdateScreen();
|
screen->startFirmwareUpdateScreen();
|
||||||
BleOta::switchToOtaApp();
|
BleOta::switchToOtaApp();
|
||||||
@@ -249,6 +250,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
|
|||||||
#endif
|
#endif
|
||||||
#if !MESHTASTIC_EXCLUDE_WIFI
|
#if !MESHTASTIC_EXCLUDE_WIFI
|
||||||
if (WiFiOTA::trySwitchToOTA()) {
|
if (WiFiOTA::trySwitchToOTA()) {
|
||||||
|
suppressRebootBanner = true;
|
||||||
if (screen)
|
if (screen)
|
||||||
screen->startFirmwareUpdateScreen();
|
screen->startFirmwareUpdateScreen();
|
||||||
WiFiOTA::saveConfig(&config.network);
|
WiFiOTA::saveConfig(&config.network);
|
||||||
|
|||||||
Reference in New Issue
Block a user