summaryrefslogtreecommitdiff
path: root/drivers.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-09-14 06:54:44 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-09-14 06:57:44 -0400
commit531f5384638b9fe3e21e542ce6eed9a39b98fdfb (patch)
tree8bb2f3db54e8243f874d61c7ea58f7a5a0e70041 /drivers.c
parentea0b84da541fb6e69d03a9dc85c399c7e4fff4cd (diff)
downloadgpsd-531f5384638b9fe3e21e542ce6eed9a39b98fdfb.tar.gz
Split Type 24 reporting, including the -s option to gpsdecode.
All regression tests pass.
Diffstat (limited to 'drivers.c')
-rw-r--r--drivers.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers.c b/drivers.c
index 0e208730..4cb267ce 100644
--- a/drivers.c
+++ b/drivers.c
@@ -1207,7 +1207,7 @@ const struct gps_type_t mtk3301 = {
static bool aivdm_decode(const char *buf, size_t buflen,
struct gps_device_t *session,
struct ais_t *ais,
- int debug)
+ bool split24, int debug)
{
#ifdef __UNUSED_DEBUG__
char *sixbits[64] = {
@@ -1363,7 +1363,7 @@ static bool aivdm_decode(const char *buf, size_t buflen,
return ais_binary_decode(ais,
ais_context->bits,
ais_context->bitlen,
- &ais_context->type24_queue);
+ split24 ? NULL : &ais_context->type24_queue);
}
/* we're still waiting on another sentence */
@@ -1383,7 +1383,9 @@ static gps_mask_t aivdm_analyze(struct gps_device_t *session)
if (session->packet.type == AIVDM_PACKET) {
if (aivdm_decode
((char *)session->packet.outbuffer, session->packet.outbuflen,
- session, &session->gpsdata.ais, session->context->debug)) {
+ session, &session->gpsdata.ais,
+ session->gpsdata.policy.split24,
+ session->context->debug)) {
return ONLINE_SET | AIS_SET;
} else
return ONLINE_SET;