gnss: disable GPS only after fetching assistance data

Fixes #21
This commit is contained in:
Arnaud Ferraris
2021-09-29 01:31:54 +02:00
parent 3f4dd9ac79
commit 34ec02cd34
2 changed files with 8 additions and 8 deletions

View File

@@ -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);

View File

@@ -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,