Reduced time drift from 60s/day to 7s/day for ESP32-based repeaters with power saving.

此提交包含在:
Kevin Le
2026-05-28 15:13:14 +07:00
父節點 f4c43f7eb7
當前提交 36a44de119
共有 2 個檔案被更改,包括 2 行新增14 行删除
+2 -2
查看文件
@@ -154,10 +154,10 @@ void loop() {
if (the_mesh.getNodePrefs()->powersaving_enabled && !the_mesh.hasPendingWork()) {
#if defined(NRF52_PLATFORM)
board.sleep(1800); // nrf ignores seconds param, sleeps whenever possible
board.sleep(0); // nrf ignores seconds param, sleeps whenever possible
#else
if (the_mesh.millisHasNowPassed(POWERSAVING_FIRSTSLEEP_SECS * 1000)) { // To check if it is time to sleep
board.sleep(1800); // Sleep. Wake up after 30 minutes or when receiving a LoRa packet
board.sleep(30); // Sleep. Wake up after a while or when receiving a LoRa packet
}
#endif
}