Add support for Aqualung i200c

It's exactly the same as the regular i200, but has a new version number
and string.

Tested-by: Tiago Thedim Dias <tiagotsoc@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2019-08-20 15:25:26 -07:00 committed by Jef Driesen
parent d21070ad1a
commit d62674a803
3 changed files with 11 additions and 5 deletions

View File

@ -237,6 +237,7 @@ static const dc_descriptor_t g_descriptors[] = {
{"Aqualung", "i550", DC_FAMILY_OCEANIC_ATOM2, 0x4642, DC_TRANSPORT_SERIAL, NULL},
{"Aqualung", "i200", DC_FAMILY_OCEANIC_ATOM2, 0x4646, DC_TRANSPORT_SERIAL, NULL},
{"Aqualung", "i300C", DC_FAMILY_OCEANIC_ATOM2, 0x4648, DC_TRANSPORT_SERIAL, NULL},
{"Aqualung", "i200C", DC_FAMILY_OCEANIC_ATOM2, 0x4649, DC_TRANSPORT_SERIAL, NULL},
{"Aqualung", "i100", DC_FAMILY_OCEANIC_ATOM2, 0x464E, DC_TRANSPORT_SERIAL, NULL},
{"Aqualung", "i770R", DC_FAMILY_OCEANIC_ATOM2, 0x4651, DC_TRANSPORT_SERIAL, NULL},
{"Aqualung", "i550C", DC_FAMILY_OCEANIC_ATOM2, 0x4652, DC_TRANSPORT_SERIAL, NULL},

View File

@ -112,6 +112,7 @@ static const oceanic_common_version_t oceanic_atom2a_version[] = {
{"OCEGEO20 \0\0 512K"},
{"OCE GEO R\0\0 512K"},
{"AQUAI200 \0\0 512K"},
{"AQUA200C \0\0 512K"},
};
static const oceanic_common_version_t oceanic_atom2b_version[] = {

View File

@ -88,6 +88,7 @@
#define I550 0x4642
#define I200 0x4646
#define I300C 0x4648
#define I200C 0x4649
#define I100 0x464E
#define I770R 0x4651
#define I550C 0x4652
@ -162,7 +163,8 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
model == A300 || model == MANTA ||
model == INSIGHT2 || model == ZEN ||
model == I300 || model == I550 ||
model == I200 || model == I300C) {
model == I200 || model == I200C ||
model == I300C) {
parser->headersize -= PAGESIZE;
} else if (model == VT4 || model == VT41) {
parser->headersize += PAGESIZE;
@ -281,6 +283,7 @@ oceanic_atom2_parser_get_datetime (dc_parser_t *abstract, dc_datetime_t *datetim
case INSIGHT2:
case I300:
case I200:
case I200C:
case I100:
case I300C:
datetime->year = ((p[3] & 0xE0) >> 1) + (p[4] & 0x0F) + 2000;
@ -718,7 +721,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == GEO || parser->model == GEO20 ||
parser->model == MANTA || parser->model == I300 ||
parser->model == I200 || parser->model == I100 ||
parser->model == I300C || parser->model == TALIS) {
parser->model == I300C || parser->model == TALIS ||
parser->model == I200C) {
have_pressure = 0;
}
@ -876,7 +880,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == OCI || parser->model == A300 ||
parser->model == I450T || parser->model == I300 ||
parser->model == I200 || parser->model == I100 ||
parser->model == I300C) {
parser->model == I300C || parser->model == I200C) {
temperature = data[offset + 3];
} else if (parser->model == OCS || parser->model == TX1) {
temperature = data[offset + 1];
@ -948,7 +952,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == OCI || parser->model == A300 ||
parser->model == I450T || parser->model == I300 ||
parser->model == I200 || parser->model == I100 ||
parser->model == I300C)
parser->model == I300C || parser->model == I200C)
depth = (data[offset + 4] + (data[offset + 5] << 8)) & 0x0FFF;
else if (parser->model == ATOM1)
depth = data[offset + 3] * 16;
@ -1001,7 +1005,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == OC1A || parser->model == OC1B ||
parser->model == OC1C || parser->model == OCI ||
parser->model == I100 || parser->model == I300C ||
parser->model == I450T) {
parser->model == I450T || parser->model == I200C) {
decostop = (data[offset + 7] & 0xF0) >> 4;
decotime = array_uint16_le(data + offset + 6) & 0x0FFF;
have_deco = 1;