summaryrefslogtreecommitdiff
path: root/gpsdecode.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-01 12:36:35 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-01 12:36:35 +0000
commit6c9afa38868a44acbaa5ae37e69dc92b7935b54e (patch)
tree4c055586844fda0cceb19014f371715de67a1323 /gpsdecode.c
parentbe2c36e3ea8010065754858912fa700a48e58232 (diff)
downloadgpsd-6c9afa38868a44acbaa5ae37e69dc92b7935b54e.tar.gz
Generated AIS parser code compiles. All tests pass.
String field postprocessing and unit tests are next.
Diffstat (limited to 'gpsdecode.c')
-rw-r--r--gpsdecode.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/gpsdecode.c b/gpsdecode.c
index 923960f3..956175fa 100644
--- a/gpsdecode.c
+++ b/gpsdecode.c
@@ -112,12 +112,13 @@ static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen)
(ais->type6.bitcount+7)/8));
break;
case 7: /* Binary Acknowledge */
+ case 13: /* Safety Related Acknowledge */
(void)snprintf(buf+strlen(buf), buflen-strlen(buf),
"%u,%u,%u,%u",
- ais->type7.mmsi[0],
- ais->type7.mmsi[1],
- ais->type7.mmsi[2],
- ais->type7.mmsi[3]);
+ ais->type7.mmsi1,
+ ais->type7.mmsi2,
+ ais->type7.mmsi3,
+ ais->type7.mmsi4);
break;
case 8: /* Binary Broadcast Message */
(void)snprintf(buf+strlen(buf), buflen-strlen(buf),
@@ -155,14 +156,6 @@ static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen)
ais->type12.retransmit,
ais->type12.text);
break;
- case 13: /* Safety Related Acknowledge */
- (void)snprintf(buf+strlen(buf), buflen-strlen(buf),
- "%u,%u,%u,%u",
- ais->type13.mmsi[0],
- ais->type13.mmsi[1],
- ais->type13.mmsi[2],
- ais->type13.mmsi[3]);
- break;
case 14: /* Safety Related Broadcast Message */
(void)snprintf(buf+strlen(buf), buflen-strlen(buf),
"%s",