mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-28 18:47:40 +00:00
show appropriate message when going into OTA mode
This commit is contained in:
parent
32d9a397aa
commit
1a0d51495d
@ -329,11 +329,7 @@ static void drawFrameFirmware(OLEDDisplay *display, OLEDDisplayUiState *state, i
|
|||||||
display->drawString(64 + x, y, "Updating");
|
display->drawString(64 + x, y, "Updating");
|
||||||
|
|
||||||
display->setFont(FONT_SMALL);
|
display->setFont(FONT_SMALL);
|
||||||
if ((millis() / 1000) % 2) {
|
display->drawStringMaxWidth(0 + x, 2 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), "Please be patient and do not power off.");
|
||||||
display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, "Please wait . . .");
|
|
||||||
} else {
|
|
||||||
display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, "Please wait . . ");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Draw the last text message we received
|
/// Draw the last text message we received
|
||||||
|
@ -112,12 +112,15 @@ bool AdminModule::handleReceivedProtobuf(const MeshPacket &mp, AdminMessage *r)
|
|||||||
#ifdef ARCH_ESP32
|
#ifdef ARCH_ESP32
|
||||||
if (BleOta::getOtaAppVersion().isEmpty()) {
|
if (BleOta::getOtaAppVersion().isEmpty()) {
|
||||||
DEBUG_MSG("No OTA firmware available, scheduling regular reboot in %d seconds\n", s);
|
DEBUG_MSG("No OTA firmware available, scheduling regular reboot in %d seconds\n", s);
|
||||||
|
screen->startRebootScreen();
|
||||||
}else{
|
}else{
|
||||||
|
screen->startFirmwareUpdateScreen();
|
||||||
BleOta::switchToOtaApp();
|
BleOta::switchToOtaApp();
|
||||||
DEBUG_MSG("Rebooting to OTA in %d seconds\n", s);
|
DEBUG_MSG("Rebooting to OTA in %d seconds\n", s);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
DEBUG_MSG("Not on ESP32, scheduling regular reboot in %d seconds\n", s);
|
DEBUG_MSG("Not on ESP32, scheduling regular reboot in %d seconds\n", s);
|
||||||
|
screen->startRebootScreen();
|
||||||
#endif
|
#endif
|
||||||
rebootAtMsec = (s < 0) ? 0 : (millis() + s * 1000);
|
rebootAtMsec = (s < 0) ? 0 : (millis() + s * 1000);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user