diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-10-01 23:24:21 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-10-01 23:24:21 +0000 |
commit | a93eedd514133ea4a60fd0756947c827546d72c5 (patch) | |
tree | 9ae1bba752acb0130dcf1c1cf82e8a4452b28153 /driver_zodiac.c | |
parent | 1711ebc03a92948579855c860759f18fa9d328d0 (diff) | |
download | gpsd-a93eedd514133ea4a60fd0756947c827546d72c5.tar.gz |
Clear up some driver-level confusion surrounding timestamp setting.
There was lots of duplicative setting of gpsdata.fix.time and
gpsdata.sentence_time. The latter is now gone. The only case the
sentence_time member was actually used for was timestamping skyviews;
a new gpsdata.skyview_time now handles that, and all drivers set it
properly.
Diffstat (limited to 'driver_zodiac.c')
-rw-r--r-- | driver_zodiac.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/driver_zodiac.c b/driver_zodiac.c index cc04f279..93bfaf45 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -157,7 +157,7 @@ static gps_mask_t handle1000(struct gps_device_t *session) unpacked_date.tm_sec = (int)getzword(24); subseconds = (int)getzlong(25) / 1e9; /*@ -compdef */ - session->gpsdata.fix.time = session->gpsdata.sentence_time = + session->gpsdata.fix.time = (double)mkgmtime(&unpacked_date) + subseconds; /*@ +compdef */ #ifdef NTPSHM_ENABLE @@ -274,6 +274,7 @@ static gps_mask_t handle1002(struct gps_device_t *session) break; } } + session->gpsdata.skyview_time = timestamp(); gpsd_report(LOG_DATA, "1002: visible=%d used=%d mask=SATELLITE|USED\n", session->gpsdata.satellites_visible, @@ -320,6 +321,7 @@ static gps_mask_t handle1003(struct gps_device_t *session) session->gpsdata.elevation[i] = 0; } } + session->gpsdata.skyview_time = timestamp(); gpsd_report(LOG_DATA, "NAVDOP: visible=%d gdop=%.2f pdop=.2%f " "hdop=.2%f vdop=.2%f tdop=.2%f mask=SATELLITE|DOP\n", session->gpsdata.satellites_visible, |