Skip to content
Snippets Groups Projects
Commit 987ea5b7 authored by Jussi Kivilinna's avatar Jussi Kivilinna
Browse files

ubgps: fix power-management threshold comparisons

parent 21df1ef8
No related branches found
No related tags found
No related merge requests found
...@@ -464,7 +464,7 @@ int ubgps_config(gps_config_t const config, void const * const value) ...@@ -464,7 +464,7 @@ int ubgps_config(gps_config_t const config, void const * const value)
gps->state.current_state == GPS_STATE_FIX_ACQUIRED) gps->state.current_state == GPS_STATE_FIX_ACQUIRED)
{ {
#ifdef CONFIG_UBGPS_PSM_MODE #ifdef CONFIG_UBGPS_PSM_MODE
if (gps->state.navigation_rate >= CONFIG_UBGPS_PSM_MODE_THRESHOLD) if (gps->state.navigation_rate >= CONFIG_UBGPS_PSM_MODE_THRESHOLD * 1000)
{ {
/* Use default navigation rate for SW controlled PSM */ /* Use default navigation rate for SW controlled PSM */
......
...@@ -450,7 +450,7 @@ static int ubgps_sm_global(struct ubgps_s * const gps, struct sm_event_s const * ...@@ -450,7 +450,7 @@ static int ubgps_sm_global(struct ubgps_s * const gps, struct sm_event_s const *
/* Construct power save mode event */ /* Construct power save mode event */
if (gps->state.navigation_rate >= CONFIG_UBGPS_PSM_MODE_THRESHOLD) if (gps->state.navigation_rate >= CONFIG_UBGPS_PSM_MODE_THRESHOLD * 1000)
{ {
struct sm_event_psm_event_s psm; struct sm_event_psm_event_s psm;
...@@ -577,7 +577,7 @@ static int ubgps_sm_global(struct ubgps_s * const gps, struct sm_event_s const * ...@@ -577,7 +577,7 @@ static int ubgps_sm_global(struct ubgps_s * const gps, struct sm_event_s const *
{ {
/* Start SW controlled power save mode (PSM). */ /* Start SW controlled power save mode (PSM). */
if (gps->state.navigation_rate >= CONFIG_UBGPS_PSM_MODE_THRESHOLD) if (gps->state.navigation_rate >= CONFIG_UBGPS_PSM_MODE_THRESHOLD * 1000)
{ {
struct timespec ts = {}; struct timespec ts = {};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment