summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-03 16:12:47 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-04 16:23:28 -0400
commit7eacbef3fa19f37e85d452787a605aad1396a4d2 (patch)
tree6dffcfb82c66f69ba096385a3eb60c1256ef37df /libgpsd_core.c
parent85971992215d9ee830046c18d3899f663c8a20df (diff)
downloadgpsd-7eacbef3fa19f37e85d452787a605aad1396a4d2.tar.gz
Change the logic for managing the drive mode bit to report reality...
...rather than setting it ad-hoc on a per-driver basis.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index dd317a03..4d92a433 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -1106,6 +1106,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
}
/*@+nullderef@*/
session->badcount = 0;
+ session->gpsdata.dev.driver_mode = (session->packet.type > NMEA_PACKET) ? MODE_BINARY : MODE_NMEA;
/* FALL THROUGH */
/*
* Fail hunt only if we get a second consecutive bad packet