diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-08-22 16:14:39 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-08-22 16:15:43 -0400 |
commit | e6d622fabf16b0ca90b18c8b30bfcf95bd2bf3af (patch) | |
tree | f6df2c5d43d3b0a49c8264fdf965bd05140fc40c /gpsmon.c | |
parent | d1a9c349f3b868d52f015361ccf1cb2fad42e282 (diff) | |
download | gpsd-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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@*/ |