summaryrefslogtreecommitdiff
path: root/driver_oncore.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-09 07:29:06 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-09 07:29:06 +0000
commit5744aee5cb326e473db12a1b104b328bd247d23c (patch)
tree3e3d5919ae755a0bd398066c0d7e798255c2e7ec /driver_oncore.c
parent9e679fb1711620fe95cb39e6f1f029e39b4bcea6 (diff)
downloadgpsd-5744aee5cb326e473db12a1b104b328bd247d23c.tar.gz
Reliable cycle-start indication for almost all drivers.
Some regression tests needed to be rebuilt as a result. One new regression test, for iTalk binary.
Diffstat (limited to 'driver_oncore.c')
-rw-r--r--driver_oncore.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/driver_oncore.c b/driver_oncore.c
index 3bc6e6f1..c68b68ef 100644
--- a/driver_oncore.c
+++ b/driver_oncore.c
@@ -315,6 +315,16 @@ gps_mask_t oncore_dispatch(struct gps_device_t *session, unsigned char *buf, siz
(void)snprintf(session->gpsdata.tag, sizeof(session->gpsdata.tag),
"MOT-%c%c", type>>8, type&0xff);
+ /*
+ * Only one message sends actual fix data, so we can treat it as
+ * both start-of-cycle and end-of-cycle. For correctness, and in
+ * case the reports ever merge data from other sentences, we
+ * should find out what the actual cycle-ender is.
+ */
+ session->cycle_state |= CYCLE_END_RELIABLE;
+ if (type == ONCTYPE('E','a'))
+ session->cycle_state |= CYCLE_START | CYCLE_END;
+
switch (type)
{
case ONCTYPE('B','b'):