diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-07 05:50:01 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-07 05:50:01 -0500 |
commit | 61c16bebe1a56cb1c211733b92474bf866eba87d (patch) | |
tree | 8b078214f79fae9b8f9bdf608a6f69eebf334801 /libgpsd_core.c | |
parent | e92b21041e00778c72362620ad9d62ffa94613db (diff) | |
download | gpsd-61c16bebe1a56cb1c211733b92474bf866eba87d.tar.gz |
ntplib extraction requires libgpsd object format bump to 23.
The new struct ppsthread_t isolates the interface to the PPS monitor loop.
It will need more members before we're done, including some reporting
hooks.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index d9db154a..26560cb6 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -303,11 +303,8 @@ void gpsd_init(struct gps_device_t *session, struct gps_context_t *context, /* initialize GPS polling */ { /* clear some times */ - session->last_fixtime.real = 0.0; - /*@i2@*/session->last_fixtime.clock.tv_sec = 0; - /*@i2@*/session->last_fixtime.clock.tv_nsec = 0; #ifdef PPS_ENABLE - memset((void *)&session->pps_state, 0, sizeof(session->pps_state)); + memset((void *)&session->pps_thread, 0, sizeof(session->pps_thread)); #endif /* PPS_ENABLE */ /*@ -mayaliasunique @*/ @@ -400,12 +397,9 @@ void gpsd_clear(struct gps_device_t *session) /* clear the private data union */ memset( (void *)&session->driver, '\0', sizeof(session->driver)); - /* clear some times */ - session->last_fixtime.real = 0.0; - /*@i2@*/session->last_fixtime.clock.tv_sec = 0; - /*@i2@*/session->last_fixtime.clock.tv_nsec = 0; #ifdef PPS_ENABLE - memset((void *)&session->pps_state, 0, sizeof(session->pps_state)); + /* clear some times */ + memset((void *)&session->pps_thread, 0, sizeof(session->pps_thread)); #endif /* PPS_ENABLE */ session->opentime = timestamp(); @@ -1647,7 +1641,7 @@ void ntp_latch(struct gps_device_t *device, struct timedelta_t /*@out@*/*td) #ifdef PPS_ENABLE /* thread-safe update */ /*@-compdef@*/ - status = pps_thread_stash_fixtime(&device->last_fixtime, + status = pps_thread_stash_fixtime(&device->pps_thread, device->newdata.time, td->clock); /*@+compdef@*/ if (status == PPS_LOCK_ERR) { |