diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-10-05 17:40:36 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-10-05 17:40:36 -0400 |
commit | 51acb55669c76de87d0af493039dd7caf2ab2f2b (patch) | |
tree | 6b7b133d005016554d30930c695149232e69213e /driver_ais.c | |
parent | 23b9cc85e2382ced71430386e1ff98fd293be268 (diff) | |
download | gpsd-51acb55669c76de87d0af493039dd7caf2ab2f2b.tar.gz |
Inland AIS Water level support is done except for the JSON dumping.
Diffstat (limited to 'driver_ais.c')
-rw-r--r-- | driver_ais.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/driver_ais.c b/driver_ais.c index d3452255..17d5cb89 100644 --- a/driver_ais.c +++ b/driver_ais.c @@ -678,6 +678,21 @@ bool ais_binary_decode(const int debug, /* skip 6 bits */ imo = true; break; + case 24: + UCHARS(56, ais->type8.dac200fid24.country); +#define ARRAY_BASE 68 +#define ELEMENT_SIZE 25 + for (i = 0; ARRAY_BASE + (ELEMENT_SIZE*i) < bitlen; i++) { + int a = ARRAY_BASE + (ELEMENT_SIZE*i); + ais->type8.dac200fid24.gauges[i].id = UBITS(a+0, 11); + ais->type8.dac200fid24.gauges[i].level = SBITS(a+11, 14); + } + ais->type8.dac200fid24.ngauges = i; +#undef ARRAY_BASE +#undef ELEMENT_SIZE + /* skip 6 bits */ + imo = true; + break; } } /* land here if we failed to match a known DAC/FID */ |