summaryrefslogtreecommitdiff
path: root/driver_nmea.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-10-01 23:24:21 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-10-01 23:24:21 +0000
commita93eedd514133ea4a60fd0756947c827546d72c5 (patch)
tree9ae1bba752acb0130dcf1c1cf82e8a4452b28153 /driver_nmea.c
parent1711ebc03a92948579855c860759f18fa9d328d0 (diff)
downloadgpsd-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_nmea.c')
-rw-r--r--driver_nmea.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver_nmea.c b/driver_nmea.c
index 286ac2a6..37c3cdfe 100644
--- a/driver_nmea.c
+++ b/driver_nmea.c
@@ -508,6 +508,7 @@ static gps_mask_t processGPGSV(int count, char *field[], struct gps_device_t *se
gpsd_zero_satellites(&session->gpsdata);
return ERROR_SET;
sane:
+ session->gpsdata.skyview_time = timestamp();
gpsd_report(LOG_DATA, "GSV: Satellite data OK (%d of %d).\n",
session->driver.nmea.part, session->driver.nmea.await);
// FIXME: Dump satellite state at LOG_DATA level on final sentence
@@ -812,10 +813,10 @@ static gps_mask_t processPASHR(int c UNUSED, char *field[], struct gps_device_t
session->gpsdata.used[u++] = p;
}
session->gpsdata.satellites_used = u;
- // FIXME: Should dump satellites here as well
gpsd_report(LOG_DATA, "PASHR,SAT: used=%d mask=%s\n",
session->gpsdata.satellites_used,
gpsd_maskdump(mask));
+ session->gpsdata.skyview_time = timestamp();
mask |= SATELLITE_SET | USED_SET;
}
return mask;
@@ -1019,7 +1020,6 @@ gps_mask_t nmea_parse(char *sentence, struct gps_device_t *session)
session->driver.nmea.field[0]);
session->cycle_state = CYCLE_END;
}
- session->gpsdata.sentence_time = session->gpsdata.fix.time;
session->driver.nmea.lasttag = thistag;
}