diff options
author | Jason Reiss <jreiss@multitech.com> | 2021-11-30 08:41:27 -0600 |
---|---|---|
committer | Jason Reiss <jreiss@multitech.com> | 2021-11-30 08:41:27 -0600 |
commit | 6178d2a35ff4a788578fef4f5c0e40288eba7857 (patch) | |
tree | bc9fd33bdc2185d42d68c5f5aff782ec710cdf9c | |
parent | 3816992ad8285d40eb1f8ab1338c84fcc1e911b6 (diff) | |
download | lora_gateway_mtac_full-6178d2a35ff4a788578fef4f5c0e40288eba7857.tar.gz lora_gateway_mtac_full-6178d2a35ff4a788578fef4f5c0e40288eba7857.tar.bz2 lora_gateway_mtac_full-6178d2a35ff4a788578fef4f5c0e40288eba7857.zip |
Update loragw_gps.c - only update during calibration or when slope is within acceptable range.5.0.9
-rw-r--r-- | libloragw/src/loragw_gps.c | 6 |
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; } |