mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Merge pull request #2018 from got-root/fix/companion-radio-gps-persistence
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
fix(companion_radio): apply persisted GPS enabled setting on boot for ui-orig devices
This commit is contained in:
commit
8637a749f7
2 changed files with 10 additions and 0 deletions
|
|
@ -165,6 +165,12 @@ protected:
|
|||
public:
|
||||
void savePrefs() { _store->savePrefs(_prefs, sensors.node_lat, sensors.node_lon); }
|
||||
|
||||
#if ENV_INCLUDE_GPS == 1
|
||||
void applyGpsPrefs() {
|
||||
sensors.setSettingValue("gps", _prefs.gps_enabled ? "1" : "0");
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
void writeOKFrame();
|
||||
void writeErrFrame(uint8_t err_code);
|
||||
|
|
|
|||
|
|
@ -213,6 +213,10 @@ void setup() {
|
|||
|
||||
sensors.begin();
|
||||
|
||||
#if ENV_INCLUDE_GPS == 1
|
||||
the_mesh.applyGpsPrefs();
|
||||
#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