diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-05-09 13:32:39 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-05-09 13:32:39 -0400 |
commit | b49756c40c6b08cc53857cd457e6db0bc99079a9 (patch) | |
tree | 0f5e5b771a437a36ba896f09b824f9274cecfd57 /gpsd.h-tail | |
parent | 1adf3b9d7e90578daaa897f349062fcb9e917152 (diff) | |
download | gpsd-b49756c40c6b08cc53857cd457e6db0bc99079a9.tar.gz |
C AIS decoder now has separate contexts for A and B channels.
AIS regression test passes.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r-- | gpsd.h-tail | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail index 9702788c..c8904bb6 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -149,6 +149,8 @@ extern size_t oncore_payload_cksum_length(unsigned char id1,unsigned char id2); #define NTPSHMSEGS 4 /* number of NTP SHM segments */ +#define AIVDM_CHANNELS 2 /* A, B */ + struct gps_context_t { int valid; /* member validity flags */ bool readonly; /* if true, never write to device */ @@ -454,7 +456,7 @@ struct gps_device_t { * systems may come over the same wire with GPS NMEA sentences. */ #ifdef AIVDM_ENABLE - struct aivdm_context_t aivdm; + struct aivdm_context_t aivdm[AIVDM_CHANNELS]; #endif /* AIVDM_ENABLE */ #ifdef TIMING_ENABLE @@ -584,7 +586,9 @@ extern bool ubx_write(struct gps_device_t *, unsigned int, unsigned int, /*@null@*/unsigned char *, unsigned short); #endif /* UBX_ENABLE */ #ifdef AIVDM_ENABLE -extern bool aivdm_decode(const char *, size_t, struct aivdm_context_t *, struct ais_t *); +extern bool aivdm_decode(const char *, size_t, + struct aivdm_context_t [], + struct ais_t *); extern void aivdm_json_dump(const struct ais_t *, bool, /*@out@*/char *, size_t); #endif /* AIVDM_ENABLE */ #ifdef MTK3301_ENABLE |