diff options
author | Gary E. Miller <gem@rellim.com> | 2016-04-05 14:28:14 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-04-05 14:28:14 -0700 |
commit | b82cc253da1de5c9beb4674a2e7f855aaea010e5 (patch) | |
tree | 470c13341100967baee00fef19614174e03c8399 | |
parent | e30203491a842d63254db19fe261971f98c50a36 (diff) | |
download | gpsd-b82cc253da1de5c9beb4674a2e7f855aaea010e5.tar.gz |
Bad NMEA time was still leaking, require 3 fixes for time.
-rw-r--r-- | gpsd.c | 2 | ||||
-rw-r--r-- | ppsthread.h | 2 | ||||
-rw-r--r-- | timehint.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -1517,7 +1517,7 @@ static void all_reports(struct gps_device_t *device, gps_mask_t changed) */ if ((changed & TIME_SET) == 0) { //gpsd_log(&context.errout, LOG_PROG, "NTP: No time this packet\n"); - } else if ( 0 >= device->fixcnt && + } else if ( PPS_MIN_FIXES > device->fixcnt && (changed & GOODTIME_IS) == 0) { /* many GPS spew random times until a valid GPS fix */ //gpsd_log(&context.errout, LOG_PROG, "NTP: no fix\n"); diff --git a/ppsthread.h b/ppsthread.h index b37e739c..7c3c5d65 100644 --- a/ppsthread.h +++ b/ppsthread.h @@ -16,6 +16,8 @@ struct timedelta_t { }; #endif /* TIMEDELTA_DEFINED */ +#define PPS_MIN_FIXES 3 /* # fixes to wait for before shipping NTP time */ + /* * Set context, devicefd, and devicename at initialization time, before * you call pps_thread_activate(). The context pointer can be used to @@ -105,8 +105,6 @@ * garbage-collects them when they have no attached processes. */ -#define PPS_MIN_FIXES 3 /* # fixes to wait for before shipping PPS */ - static volatile struct shmTime *getShmTime(struct gps_context_t *context, int unit) { int shmid; |