Update MeshCore features and OTA layout handling

This commit is contained in:
mikecarper committed 2026-08-18 23:17:42 -07:00
1 parent e4c8ae5a0b
commit e742333a0e
74 files changed
+1696 -1169

No files matched your search

+18
View File
@@ -56,6 +56,7 @@ void halt() {
}
static char command[160];
static const unsigned long POWERSAVING_FIRST_SLEEP_SECS = 120;
void setup() {
Serial.begin(115200);
@@ -179,4 +180,21 @@ void loop() {
#ifdef HAS_EXTERNAL_WATCHDOG
external_watchdog.loop();
#endif
if (the_mesh.getNodePrefs()->powersaving_enabled
&& !board.isUsbDataConnected()) {
uint32_t sleep_secs = the_mesh.getPowerSaveSleepSeconds(30);
#ifdef HAS_EXTERNAL_WATCHDOG
if (sleep_secs > 0) external_watchdog.feed();
#endif
#if defined(NRF52_PLATFORM)
if (sleep_secs > 0) board.sleep(0);
#else
if (sleep_secs > 0
&& the_mesh.millisHasNowPassed(
POWERSAVING_FIRST_SLEEP_SECS * 1000UL)) {
board.sleep(sleep_secs);
}
#endif
}
}