diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 1abd62e3..8d06a2ba 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -1143,8 +1143,8 @@ capped even before the first fix ever, so a node that never sees the sky does not keep the receiver powered. It sets `gps period` to 0. The position still comes from prefs (see `set advert.loc`), so duty mode does not affect what a repeater advertises. `gps on` / `gps off` leave duty mode. Build-time knobs: -`GPS_DUTY_SYNC_INTERVAL_SECS` (1800), `GPS_DUTY_MAX_AWAKE_SECS` (300, the cap on -one attempt) and `GPS_DUTY_RETRY_SECS` (3600, backoff after a window with no fix). +`GPS_DUTY_SYNC_INTERVAL_SECS` (86400), `GPS_DUTY_MAX_AWAKE_SECS` (300, the cap on +one attempt) and `GPS_DUTY_RETRY_SECS` (21600, backoff after a window with no fix). --- diff --git a/src/helpers/SensorManager.h b/src/helpers/SensorManager.h index aaf5b36d..d5b109de 100644 --- a/src/helpers/SensorManager.h +++ b/src/helpers/SensorManager.h @@ -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 { diff --git a/variants/t1000-e/target.cpp b/variants/t1000-e/target.cpp index 76536e9c..8947f637 100644 --- a/variants/t1000-e/target.cpp +++ b/variants/t1000-e/target.cpp @@ -98,7 +98,7 @@ void T1000SensorManager::stop_gps() { // The off-state is stop_gps(), which (AirohaGpsDriver::stop() since the upstream // GPS refactor) keeps GPS_VRTC_EN asserted and puts the AG3335 into RTC backup sleep, // so the receiver retains its almanac and the next window gets a warm fix -// instead of a cold start every 30 minutes. +// instead of a cold start in every window. void T1000SensorManager::gpsDutyLoop() { if (!gps_duty) return;