command fixes

This commit is contained in:
liquidraver
2026-08-30 09:27:20 +02:00
parent e1e5863688
commit ccb7fc748d
7 changed files with 323 additions and 137 deletions
+6 -2
View File
@@ -1446,8 +1446,12 @@ int main(void)
* loadPrefs then keeps that 0 instead of the real default (this is what
* zeroed probe_interval / cad_auto and, earlier, the GPS settings). */
initNodePrefs(&companion_mesh.prefs);
/* Companion-specific overrides vs. initNodePrefs defaults: */
companion_mesh.prefs.auto_shutdown_mv = CONFIG_ZEPHCORE_AUTO_SHUTDOWN_MILLIVOLTS; /* low-batt cutoff (0=off) */
/* Companion-specific overrides vs. initNodePrefs defaults. auto_shutdown_mv
* used to be set here too; it now comes from initNodePrefs() itself, which
* is what the comment above asks for — a value listed only here is invisible
* to every other caller of initNodePrefs(). gps_interval stays because
* initNodePrefs() hardcodes the 300 s companion figure while repeaters run a
* much longer duty; this line is how a board's Kconfig value wins. */
companion_mesh.prefs.gps_interval = CONFIG_ZEPHCORE_GPS_POLL_INTERVAL_SEC; /* 5-min duty cycle (0=always-on) */
/* Load prefs from storage */