gps duty: sync once a day, retry a failed window after 6 h

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-12 09:49:46 +01:00
1 parent 84e4136a84
commit 3c7d947887
3 files changed
+11 -7

No files matched your search

+8 -4
View File
@@ -15,9 +15,11 @@
// biggest lever there is -- an L76K draws 25-35 mA, an order of magnitude more
// than the whole radio + MCU budget it is being spent next to.
#ifndef GPS_DUTY_SYNC_INTERVAL_SECS
// Same cadence as MicroNMEALocationProvider::TIME_SYNC_INTERVAL, so clock
// accuracy is unchanged from `gps on` -- only the power in between differs.
#define GPS_DUTY_SYNC_INTERVAL_SECS 1800
// Once a day. The LF crystal (USE_LFXO) is +-20 ppm, plus ~40 ppm at -10 C:
// ~5 s/day, far below what the mesh notices (replay window, login
// timestamps). A reboot syncs at once regardless (setSettingValue "2").
// 30 min (upstream's TIME_SYNC_INTERVAL) cost 0.25-0.75 mA for nothing.
#define GPS_DUTY_SYNC_INTERVAL_SECS 86400
#endif
#ifndef GPS_DUTY_MAX_AWAKE_SECS
// Cap on one sync attempt: a blocked sky must not turn duty cycle back into
@@ -26,7 +28,9 @@
#endif
#ifndef GPS_DUTY_RETRY_SECS
// Backoff after a window that produced no fix (antenna, snow, indoors).
#define GPS_DUTY_RETRY_SECS 3600
// Each failed window is MAX_AWAKE at 46 mA: hourly that was 3.8 mA, ~16 %
// of a mast node, exactly when snow covers the dome; 6 h makes it 0.64 mA.
#define GPS_DUTY_RETRY_SECS 21600
#endif
class SensorManager {