From 296b13947f2f002929d60aaa29b1d686fc813d55 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Sun, 4 Dec 2016 11:46:36 +0100 Subject: [PATCH] Update the Aqualung i750TC parser The Aqualung i750TC data format appears identical to the Oceanic VTX format. Therefore the i750TC parser is updated to match with the VTX parser. --- src/oceanic_atom2_parser.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/oceanic_atom2_parser.c b/src/oceanic_atom2_parser.c index 0031a18..51ff7d1 100644 --- a/src/oceanic_atom2_parser.c +++ b/src/oceanic_atom2_parser.c @@ -522,7 +522,8 @@ oceanic_atom2_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, uns gasmix->nitrogen = 1.0 - gasmix->oxygen - gasmix->helium; break; case DC_FIELD_SALINITY: - if (parser->model == A300CS || parser->model == VTX) { + if (parser->model == A300CS || parser->model == VTX || + parser->model == I750TC) { if (data[0x18] & 0x80) { water->type = DC_WATER_FRESH; } else { @@ -659,7 +660,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_ unsigned int pressure = 0; if (have_pressure) { unsigned int idx = 2; - if (parser->model == A300CS || parser->model == VTX) + if (parser->model == A300CS || parser->model == VTX || + parser->model == I750TC) idx = 16; pressure = array_uint16_le(data + parser->header + idx); if (pressure == 10000) @@ -717,7 +719,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_ // Tank pressure (1 psi) and number tank = 0; pressure = (((data[offset + 7] << 8) + data[offset + 6]) & 0x0FFF); - } else if (parser->model == A300CS || parser->model == VTX) { + } else if (parser->model == A300CS || parser->model == VTX || + parser->model == I750TC) { // Tank pressure (1 psi) and number (one based index) tank = (data[offset + 1] & 0x03) - 1; pressure = ((data[offset + 7] << 8) + data[offset + 6]) & 0x0FFF;