From cbe657cd77a9322534f35df3470e4fb78eec6385 Mon Sep 17 00:00:00 2001 From: Federico Amedeo Izzo Date: Tue, 16 Feb 2021 22:22:20 +0100 Subject: [PATCH] UI: Fixed GPS OFF bug caused by ambiguous enable/disable code --- openrtx/src/ui/ui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openrtx/src/ui/ui.c b/openrtx/src/ui/ui.c index 1bda5641..9d2fda2b 100644 --- a/openrtx/src/ui/ui.c +++ b/openrtx/src/ui/ui.c @@ -1090,12 +1090,12 @@ void ui_updateFSM(event_t event, bool *sync_rtx) // Disable or Enable GPS to stop or start GPS thread if(state.settings.gps_enabled) { - state.settings.gps_enabled = !state.settings.gps_enabled; + state.settings.gps_enabled = 0; gps_disable(); } else { - state.settings.gps_enabled = !state.settings.gps_enabled; + state.settings.gps_enabled = 1; gps_enable(); } break;