summaryrefslogtreecommitdiff
path: root/driver_nmea2000.c
diff options
context:
space:
mode:
authorReinhard Arlt <reinhard.arlt@t-online.de>2014-08-21 15:53:16 +0200
committerReinhard Arlt <reinhard.arlt@t-online.de>2014-08-21 15:53:16 +0200
commit0dded69ddcd44982c15b1e5330bd2f1270263102 (patch)
treee134514e2de688f6e18e6151d3943a43a413dd2d /driver_nmea2000.c
parentb654c334061a65281e62ae7edc61545fd1c0dc17 (diff)
downloadgpsd-0dded69ddcd44982c15b1e5330bd2f1270263102.tar.gz
Fix NME2000 AIS Type 24 handling.
Diffstat (limited to 'driver_nmea2000.c')
-rw-r--r--driver_nmea2000.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/driver_nmea2000.c b/driver_nmea2000.c
index afc30dc6..3fe2dbdb 100644
--- a/driver_nmea2000.c
+++ b/driver_nmea2000.c
@@ -854,10 +854,6 @@ static gps_mask_t hnd_129810(unsigned char *bu, int len, PGN *pgn, struct gps_de
beam = getleu16(bu, 22);
to_starboard = getleu16(bu, 24);
to_bow = getleu16(bu, 26);
- ais->type24.dim.to_bow = (unsigned int) (to_bow/10);
- ais->type24.dim.to_stern = (unsigned int) ((length-to_bow)/10);
- ais->type24.dim.to_port = (unsigned int) ((beam-to_starboard)/10);
- ais->type24.dim.to_starboard = (unsigned int) (to_starboard/10);
if ((length == 0xffff) || (to_bow == 0xffff)) {
length = 0;
to_bow = 0;
@@ -866,6 +862,10 @@ static gps_mask_t hnd_129810(unsigned char *bu, int len, PGN *pgn, struct gps_de
beam = 0;
to_starboard = 0;
}
+ ais->type24.dim.to_bow = (unsigned int) (to_bow/10);
+ ais->type24.dim.to_stern = (unsigned int) ((length-to_bow)/10);
+ ais->type24.dim.to_port = (unsigned int) ((beam-to_starboard)/10);
+ ais->type24.dim.to_starboard = (unsigned int) (to_starboard/10);
}
for (i = 0; i < MAX_TYPE24_INTERLEAVE; i++) {