From ff3a9dcb20b5e24541dbbe8251005ff7acb7e269 Mon Sep 17 00:00:00 2001 From: Reinhard Arlt Date: Wed, 18 Feb 2015 11:33:19 +0100 Subject: Fix another type24 bug in driver_nmea2000.c --- driver_nmea2000.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'driver_nmea2000.c') diff --git a/driver_nmea2000.c b/driver_nmea2000.c index 628abd7d..1a4e0741 100644 --- a/driver_nmea2000.c +++ b/driver_nmea2000.c @@ -831,7 +831,7 @@ static gps_mask_t hnd_129810(unsigned char *bu, int len, PGN *pgn, struct gps_de "pgn %6d(%3d):\n", pgn->pgn, session->driver.nmea2000.unit); if (decode_ais_header(session->context, bu, len, ais, 0xffffffffU) != 0) { - int l, i; + int l, i; ais->type24.shiptype = (unsigned int) ((bu[ 5] >> 0) & 0xff); @@ -845,6 +845,9 @@ static gps_mask_t hnd_129810(unsigned char *bu, int len, PGN *pgn, struct gps_de } ais->type24.callsign[7] = (char )0; + ais->type24.model = 0; + ais->type24.serial = 0; + if (AIS_AUXILIARY_MMSI(ais->mmsi)) { ais->type24.mothership_mmsi = (unsigned int) (getleu32(bu, 28)); } else { -- cgit v1.2.1