Skip to content

Commit

Permalink
location: Add mode change to after default is set
Browse files Browse the repository at this point in the history
Add mode change to after default is set.
The set default function forces the mode to fallback mode.

Signed-off-by: Simen S. Røstad <[email protected]>
  • Loading branch information
simensrostad committed Sep 27, 2024
1 parent 0635ba9 commit 23c092b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/modules/location/location.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ static void status_send(enum location_status status)
void trigger_location_update(void)
{
int err;
struct location_config config = {
.mode = LOCATION_REQ_MODE_ALL,
};
struct location_config config = { 0 };

if (gnss_enabled) {
location_config_defaults_set(&config, location_methods_size, location_method_types);
Expand All @@ -91,6 +89,8 @@ void trigger_location_update(void)
LOG_DBG("GNSS disabled");
}

config.mode = LOCATION_REQ_MODE_ALL;

LOG_DBG("location library initialized");

err = location_request(&config);
Expand Down

0 comments on commit 23c092b

Please sign in to comment.