Add support for the Aqualung i300C

This commit is contained in:
Jef Driesen 2018-10-14 15:18:06 +02:00
parent 52388efe59
commit 43303eadf6
3 changed files with 12 additions and 5 deletions

View File

@ -219,6 +219,7 @@ static const dc_descriptor_t g_descriptors[] = {
{"Aqualung", "i450T", DC_FAMILY_OCEANIC_ATOM2, 0x4641, DC_TRANSPORT_SERIAL, NULL},
{"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", "i100", DC_FAMILY_OCEANIC_ATOM2, 0x464E, DC_TRANSPORT_SERIAL, NULL},
{"Aqualung", "i770R", DC_FAMILY_OCEANIC_ATOM2, 0x4651, DC_TRANSPORT_SERIAL, NULL},
/* Mares Nemo */

View File

@ -121,6 +121,7 @@ static const oceanic_common_version_t oceanic_atom2b_version[] = {
{"AQUAI300 \0\0 512K"},
{"HOLLDG03 \0\0 512K"},
{"AQUAI100 \0\0 512K"},
{"AQUA300C \0\0 512K"},
};
static const oceanic_common_version_t oceanic_atom2c_version[] = {

View File

@ -86,6 +86,7 @@
#define I450T 0x4641
#define I550 0x4642
#define I200 0x4646
#define I300C 0x4648
#define I100 0x464E
#define I770R 0x4651
@ -159,7 +160,7 @@ 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 == I200 || model == I300C) {
parser->headersize -= PAGESIZE;
} else if (model == VT4 || model == VT41) {
parser->headersize += PAGESIZE;
@ -276,6 +277,7 @@ oceanic_atom2_parser_get_datetime (dc_parser_t *abstract, dc_datetime_t *datetim
case I300:
case I200:
case I100:
case I300C:
datetime->year = ((p[3] & 0xE0) >> 1) + (p[4] & 0x0F) + 2000;
datetime->month = (p[4] & 0xF0) >> 4;
datetime->day = p[3] & 0x1F;
@ -709,7 +711,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == A300 || parser->model == ZEN ||
parser->model == GEO || parser->model == GEO20 ||
parser->model == MANTA || parser->model == I300 ||
parser->model == I200 || parser->model == I100) {
parser->model == I200 || parser->model == I100 ||
parser->model == I300C) {
have_pressure = 0;
}
@ -864,7 +867,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == OC1B || parser->model == OC1C ||
parser->model == OCI || parser->model == A300 ||
parser->model == I450T || parser->model == I300 ||
parser->model == I200 || parser->model == I100) {
parser->model == I200 || parser->model == I100 ||
parser->model == I300C) {
temperature = data[offset + 3];
} else if (parser->model == OCS || parser->model == TX1) {
temperature = data[offset + 1];
@ -934,7 +938,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == OC1B || parser->model == OC1C ||
parser->model == OCI || parser->model == A300 ||
parser->model == I450T || parser->model == I300 ||
parser->model == I200 || parser->model == I100)
parser->model == I200 || parser->model == I100 ||
parser->model == I300C)
depth = (data[offset + 4] + (data[offset + 5] << 8)) & 0x0FFF;
else if (parser->model == ATOM1)
depth = data[offset + 3] * 16;
@ -985,7 +990,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
} else if (parser->model == I200 || parser->model == I300 ||
parser->model == OC1A || parser->model == OC1B ||
parser->model == OC1C || parser->model == OCI ||
parser->model == I100) {
parser->model == I100 || parser->model == I300C) {
decostop = (data[offset + 7] & 0xF0) >> 4;
decotime = array_uint16_le(data + offset + 6) & 0x0FFF;
have_deco = 1;