summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libloragw/src/loragw_gps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libloragw/src/loragw_gps.c b/libloragw/src/loragw_gps.c
index 68a65ac..7eece2c 100644
--- a/libloragw/src/loragw_gps.c
+++ b/libloragw/src/loragw_gps.c
@@ -644,20 +644,20 @@ int lgw_gps_sync(struct tref *ref, uint32_t count_us, struct timespec gps_time)
slope = 0.0;
}
- update = ((slope >= MINUS_10PPM && slope <= PLUS_10PPM) || cnt_diff > 1.5);
+ update = (slope >= MINUS_10PPM && slope <= PLUS_10PPM);
if (!calibrating && utc_diff < 10.0) {
return LGW_GPS_ERROR;
}
if (calibrating && !update && utc_diff > 1.5) {
- update = true;
+ update = true;
} else if (update) {
calibrating = false;
}
} else {
- update = true;
+ update = true;
slope = 0.0;
}