From 34ec02cd348f9cec073bbc893f305cca005590f8 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Wed, 29 Sep 2021 01:31:54 +0200 Subject: [PATCH] gnss: disable GPS only after fetching assistance data Fixes #21 --- src/gnss.c | 14 +++++++------- src/manager.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gnss.c b/src/gnss.c index 2dda896..d2ab48e 100644 --- a/src/gnss.c +++ b/src/gnss.c @@ -434,6 +434,13 @@ void gnss_step(struct EG25Manager *manager) g_message("GNSS assistance upload started..."); /* fall-through */ + case EG25_GNSS_STEP_FETCH_ASSISTANCE_DATA: + g_message("GNSS assistance upload step (%d/%d): " + "fetching assistance data", + manager->gnss_assistance_step, EG25_GNSS_STEP_LAST); + fetch_assistance_data(manager); + break; + #ifdef HAVE_MMGLIB case EG25_GNSS_STEP_MM_GNSS_DISABLE: if (manager->modem_iface == MODEM_IFACE_MODEMMANAGER) { @@ -453,13 +460,6 @@ void gnss_step(struct EG25Manager *manager) state_at_gnss(manager); break; - case EG25_GNSS_STEP_FETCH_ASSISTANCE_DATA: - g_message("GNSS assistance upload step (%d/%d): " - "fetching assistance data", - manager->gnss_assistance_step, EG25_GNSS_STEP_LAST); - fetch_assistance_data(manager); - break; - case EG25_GNSS_STEP_INIT_UPLOAD: g_message("GNSS assistance upload step (%d/%d): initiating upload", manager->gnss_assistance_step, EG25_GNSS_STEP_LAST); diff --git a/src/manager.h b/src/manager.h index f0f01ba..5e2440e 100644 --- a/src/manager.h +++ b/src/manager.h @@ -18,11 +18,11 @@ typedef enum { EG25_GNSS_STEP_FIRST = 0, + EG25_GNSS_STEP_FETCH_ASSISTANCE_DATA, #ifdef HAVE_MMGLIB EG25_GNSS_STEP_MM_GNSS_DISABLE, #endif EG25_GNSS_STEP_AT_GNSS_DISABLE, - EG25_GNSS_STEP_FETCH_ASSISTANCE_DATA, EG25_GNSS_STEP_INIT_UPLOAD, EG25_GNSS_STEP_UPLOAD, EG25_GNSS_STEP_FINISH_UPLOAD,