* Companion: applyGPSPrefs() now just in one place (moved out of UITask)

This commit is contained in:
Scott Powell
2026-03-25 16:26:51 +11:00
parent 8637a749f7
commit 2325973fec
2 changed files with 5 additions and 12 deletions

View File

@@ -168,6 +168,11 @@ public:
#if ENV_INCLUDE_GPS == 1
void applyGpsPrefs() {
sensors.setSettingValue("gps", _prefs.gps_enabled ? "1" : "0");
if (_prefs.gps_interval > 0) {
char interval_str[12]; // Max: 24 hours = 86400 seconds (5 digits + null)
sprintf(interval_str, "%u", _prefs.gps_interval);
sensors.setSettingValue("gps_interval", interval_str);
}
}
#endif