Skip to content

Commit

Permalink
lib: location: Fix warning log for wrong GNSS system/func mode
Browse files Browse the repository at this point in the history
Location library is expected to print a verbose error when GNSS
is not enabled in the system or functional mode. The error returned
by the GNSS API was changed in libmodem v2.3.0, but the
implementation in the library still expected the old error code.

Signed-off-by: Tommi Kangas <[email protected]>
  • Loading branch information
tokangas authored and anangl committed Sep 5, 2023
1 parent 0b146d4 commit 9feddac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/location/method_gnss.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,8 @@ static void method_gnss_positioning_work_fn(struct k_work *work)

/* Configure GNSS to continuous tracking mode */
err = nrf_modem_gnss_fix_interval_set(1);
if (err == -EINVAL) {
LOG_WRN("First nrf_modem_gnss API function failed. It could be that "
"modem's system or functional mode doesn't allow GNSS usage.");
if (err == -NRF_EACCES) {
LOG_WRN("Modem's system or functional mode doesn't allow GNSS usage");
}

#if defined(CONFIG_NRF_CLOUD_AGPS_ELEVATION_MASK)
Expand Down

0 comments on commit 9feddac

Please sign in to comment.