Add GPS configuration to NodePrefs structure and persist the GPS
enabled state when toggled via UI. This ensures GPS settings are
retained across device restarts.
This commit is contained in:
csrutil
2025-11-29 16:37:23 +08:00
vanhempi fe874032d5
commit c641beabd3
4 muutettua tiedostoa jossa 16 lisäystä ja 0 poistoa
@@ -863,13 +863,16 @@ void UITask::toggleGPS() {
if (strcmp(_sensors->getSettingName(i), "gps") == 0) {
if (strcmp(_sensors->getSettingValue(i), "1") == 0) {
_sensors->setSettingValue("gps", "0");
_node_prefs->gps_enabled = 0;
notify(UIEventType::ack);
showAlert("GPS: Disabled", 800);
} else {
_sensors->setSettingValue("gps", "1");
_node_prefs->gps_enabled = 1;
notify(UIEventType::ack);
showAlert("GPS: Enabled", 800);
}
the_mesh.savePrefs();
_next_refresh = 0;
break;
}