mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
move GPS preference initialization to UITask
This commit is contained in:
parent
4aebc57add
commit
39503ad0b4
2 changed files with 13 additions and 10 deletions
|
|
@ -216,16 +216,6 @@ void setup() {
|
|||
|
||||
sensors.begin();
|
||||
|
||||
#if ENV_INCLUDE_GPS == 1
|
||||
// Apply GPS preferences after sensors.begin() so gps_detected is set
|
||||
sensors.setSettingValue("gps", the_mesh.getNodePrefs()->gps_enabled ? "1" : "0");
|
||||
if (the_mesh.getNodePrefs()->gps_interval > 0) {
|
||||
char interval_str[12];
|
||||
sprintf(interval_str, "%u", the_mesh.getNodePrefs()->gps_interval);
|
||||
sensors.setSettingValue("gps_interval", interval_str);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
ui_task.begin(disp, &sensors, the_mesh.getNodePrefs()); // still want to pass this in as dependency, as prefs might be moved
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue