diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-04-12 17:31:30 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-04-12 17:31:30 -0400 |
commit | 907b55b210310ca034730fb11869f4b131fcba08 (patch) | |
tree | bd2f9e0a7a314e6d9d365844c5fd6ccb805e3fb7 /driver_evermore.c | |
parent | 54a5cf8604cd1c5a5235b8c8ef40353759eb6496 (diff) | |
download | gpsd-907b55b210310ca034730fb11869f4b131fcba08.tar.gz |
Refactor serial ntpshm_put() calls.
These calls move out of scattered places in the drivers into one spot
in libgpsd_core.c where they can be guarded with consistent validity
checks. Time offset is now computed by a new driver method,
ntp_offset(), which has access through the session structure to the
baud rate, the tag of the sentence last received, etc. If the
ntp_offset() method returns NAN, no notification is shipped.
The logic of these methods replicates the sentence and baud-rate
specific computations that were embedded in individual sentence
methods before.
All regression tests pass.
Diffstat (limited to 'driver_evermore.c')
-rw-r--r-- | driver_evermore.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/driver_evermore.c b/driver_evermore.c index 1013e8f3..30bcd3f9 100644 --- a/driver_evermore.c +++ b/driver_evermore.c @@ -562,5 +562,8 @@ const struct gps_type_t evermore_binary = #ifdef ALLOW_CONTROLSEND .control_send = evermore_control_send, /* how to send a control string */ #endif /* ALLOW_CONTROLSEND */ +#ifdef NTPSHM_ENABLE + .ntp_offset = NULL, /* no method for NTP fudge factor */ +#endif /* NTPSHM_ ENABLE */ }; #endif /* defined(EVERMORE_ENABLE) && defined(BINARY_ENABLE) */ |