diff options
author | Haakan Johansson <f96hajo@chalmers.se> | 2010-11-13 16:42:20 +0100 |
---|---|---|
committer | Jon Schlueter <jon.schlueter@gmail.com> | 2010-12-03 06:53:39 -0500 |
commit | 0dbcf2cd40f75b13f92df72873bfc60ac70ee63a (patch) | |
tree | 64f7c7582a8cefa18621c7a0b334d1f902a32c25 /driver_oncore.c | |
parent | 562831b815b65fff79e72180b5a2daa8348542fe (diff) | |
download | gpsd-0dbcf2cd40f75b13f92df72873bfc60ac70ee63a.tar.gz |
Take programmed oncore PPS offset into account. Name correction delay -> offset.
Signed-off-by: Jon Schlueter <jon.schlueter@gmail.com>
Diffstat (limited to 'driver_oncore.c')
-rw-r--r-- | driver_oncore.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/driver_oncore.c b/driver_oncore.c index b9921756..98636738 100644 --- a/driver_oncore.c +++ b/driver_oncore.c @@ -39,8 +39,8 @@ static gps_mask_t oncore_msg_navsol(struct gps_device_t *, unsigned char *, size_t); static gps_mask_t oncore_msg_utc_offset(struct gps_device_t *, unsigned char *, size_t); -static gps_mask_t oncore_msg_pps_delay(struct gps_device_t *, unsigned char *, - size_t); +static gps_mask_t oncore_msg_pps_offset(struct gps_device_t *, unsigned char *, + size_t); static gps_mask_t oncore_msg_svinfo(struct gps_device_t *, unsigned char *, size_t); static gps_mask_t oncore_msg_time_raim(struct gps_device_t *, unsigned char *, @@ -238,21 +238,21 @@ oncore_msg_utc_offset(struct gps_device_t *session, unsigned char *buf, } /** - * PPS delay + * PPS offset */ static gps_mask_t -oncore_msg_pps_delay(struct gps_device_t *session, unsigned char *buf, - size_t data_len) +oncore_msg_pps_offset(struct gps_device_t *session, unsigned char *buf, + size_t data_len) { - double pps_delay; + int pps_offset_ns; if (data_len != 11) return 0; - gpsd_report(LOG_IO, "oncore PPS delay\n"); - pps_delay = getbesl(buf, 4) / 1000000.0; + gpsd_report(LOG_IO, "oncore PPS offset\n"); + pps_offset_ns = getbesl(buf, 4); - session->driver.oncore.pps_delay = pps_delay; + session->driver.oncore.pps_offset_ns = pps_offset_ns; return 0; } @@ -365,7 +365,7 @@ gps_mask_t oncore_dispatch(struct gps_device_t * session, unsigned char *buf, case ONCTYPE('A', 't'): return 0; /* position hold position */ case ONCTYPE('A', 'y'): - return oncore_msg_pps_delay(session, buf, len); + return oncore_msg_pps_offset(session, buf, len); default: /* FIX-ME: This gets noisy in a hurry. Change once your driver works */ |