mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* 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
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:
parent
8637a749f7
commit
2325973fec
2 changed files with 5 additions and 12 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue