* Companion: applyGPSPrefs() now just in one place (moved out of UITask)
Some checks are pending
PR Build Check / build (Heltec_v3_companion_radio_ble) (push) Waiting to run
PR Build Check / build (Heltec_v3_repeater) (push) Waiting to run
PR Build Check / build (Heltec_v3_room_server) (push) Waiting to run
PR Build Check / build (LilyGo_Tlora_C6_repeater_) (push) Waiting to run
PR Build Check / build (PicoW_repeater) (push) Waiting to run
PR Build Check / build (RAK_4631_companion_radio_ble) (push) Waiting to run
PR Build Check / build (RAK_4631_repeater) (push) Waiting to run
PR Build Check / build (RAK_4631_room_server) (push) Waiting to run
PR Build Check / build (wio-e5-mini_repeater) (push) Waiting to run

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 #if ENV_INCLUDE_GPS == 1
void applyGpsPrefs() { void applyGpsPrefs() {
sensors.setSettingValue("gps", _prefs.gps_enabled ? "1" : "0"); 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 #endif

View file

@ -560,18 +560,6 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
_node_prefs = node_prefs; _node_prefs = node_prefs;
#if ENV_INCLUDE_GPS == 1
// Apply GPS preferences from stored prefs
if (_sensors != NULL && _node_prefs != NULL) {
_sensors->setSettingValue("gps", _node_prefs->gps_enabled ? "1" : "0");
if (_node_prefs->gps_interval > 0) {
char interval_str[12]; // Max: 24 hours = 86400 seconds (5 digits + null)
sprintf(interval_str, "%u", _node_prefs->gps_interval);
_sensors->setSettingValue("gps_interval", interval_str);
}
}
#endif
if (_display != NULL) { if (_display != NULL) {
_display->turnOn(); _display->turnOn();
} }