summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-22 16:14:39 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-22 16:15:43 -0400
commite6d622fabf16b0ca90b18c8b30bfcf95bd2bf3af (patch)
treef6df2c5d43d3b0a49c8264fdf965bd05140fc40c /gpsmon.c
parentd1a9c349f3b868d52f015361ccf1cb2fad42e282 (diff)
downloadgpsd-e6d622fabf16b0ca90b18c8b30bfcf95bd2bf3af.tar.gz
Re-integrate Miroslav's support for large PPS offsets.
The factoring on this could use some cleanup. All regression tests pass. PPS is live in both gpsd and gpsmon.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gpsmon.c b/gpsmon.c
index f9973a27..e6d57c88 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -698,6 +698,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
/* per-packet hook */
{
char buf[BUFSIZ];
+ struct timedrift_t td;
#ifdef PPS_ENABLE
if (!serial && strncmp((char*)device->packet.outbuffer, "{\"class\":\"PPS\",", 13) == 0)
@@ -778,7 +779,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
report_unlock();
/* Update the last fix time seen for PPS. FIXME: do this here? */
- device->last_fixtime = device->newdata.time;
+ ntpshm_latch(device, &td);
}
/*@+observertrans +nullpass +globstate +compdef +uniondef@*/