diff options
-rw-r--r-- | gpsd.c | 2 | ||||
-rw-r--r-- | gpsd.h-tail | 2 | ||||
-rw-r--r-- | ppsthread.h | 2 | ||||
-rw-r--r-- | timehint.c | 2 |
4 files changed, 4 insertions, 4 deletions
@@ -1523,7 +1523,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 ( PPS_MIN_FIXES > device->fixcnt && + } else if ( NTP_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/gpsd.h-tail b/gpsd.h-tail index 7e0a2e5a..4a15d34b 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -221,6 +221,8 @@ extern int packet_sniff(struct gps_lexer_t *); #define GPSD_CONFIDENCE CEP95_SIGMA #define NTPSHMSEGS (MAX_DEVICES * 2) /* number of NTP SHM segments */ +#define NTP_MIN_FIXES 3 /* # fixes to wait for before shipping NTP time */ + #define AIVDM_CHANNELS 2 /* A, B */ diff --git a/ppsthread.h b/ppsthread.h index 7c3c5d65..b37e739c 100644 --- a/ppsthread.h +++ b/ppsthread.h @@ -16,8 +16,6 @@ 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 @@ -370,7 +370,7 @@ static char *report_hook(volatile struct pps_thread_t *pps_thread, * for all cases as we have no other general way to know * if PPS is good. */ - if (session->fixcnt <= PPS_MIN_FIXES && + if (session->fixcnt <= NTP_MIN_FIXES && (session->gpsdata.set & GOODTIME_IS) == 0) return "no fix"; } |