Add support for the Aqualung i750TC

This commit is contained in:
Jef Driesen 2016-10-20 09:18:09 +02:00
parent 4d5bc22242
commit 61f3031364
3 changed files with 19 additions and 8 deletions

View File

@ -200,6 +200,7 @@ static const dc_descriptor_t g_descriptors[] = {
{"Sherwood", "Vision", DC_FAMILY_OCEANIC_ATOM2, 0x4556},
{"Oceanic", "VTX", DC_FAMILY_OCEANIC_ATOM2, 0x4557},
{"Aqualung", "i300", DC_FAMILY_OCEANIC_ATOM2, 0x4559},
{"Aqualung", "i750TC", DC_FAMILY_OCEANIC_ATOM2, 0x455A},
{"Aqualung", "i450T", DC_FAMILY_OCEANIC_ATOM2, 0x4641},
{"Aqualung", "i550T", DC_FAMILY_OCEANIC_ATOM2, 0x4642},
/* Mares Nemo */

View File

@ -35,6 +35,7 @@
#define ISINSTANCE(device) dc_device_isinstance((device), &oceanic_atom2_device_vtable.base)
#define VTX 0x4557
#define I750TC 0x455A
#define MAXRETRIES 2
#define MAXDELAY 16
@ -183,6 +184,7 @@ static const oceanic_common_version_t oceanic_reactpro_version[] = {
static const oceanic_common_version_t aeris_a300cs_version[] = {
{"AER300CS \0\0 2048"},
{"OCEANVTX \0\0 2048"},
{"AQUAI750 \0\0 2048"},
};
static const oceanic_common_version_t aqualung_i450t_version[] = {
@ -595,7 +597,7 @@ oceanic_atom2_device_open2 (dc_device_t **out, dc_context_t *context, const char
// Get the correct baudrate.
unsigned int baudrate = 38400;
if (model == VTX) {
if (model == VTX || model == I750TC) {
baudrate = 115200;
}

View File

@ -81,6 +81,7 @@
#define VISION 0x4556
#define VTX 0x4557
#define I300 0x4559
#define I750TC 0x455A
#define I450T 0x4641
#define I550T 0x4642
@ -168,7 +169,8 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
} else if (model == F11A || model == F11B) {
parser->headersize = 5 * PAGESIZE;
parser->footersize = 0;
} else if (model == A300CS || model == VTX || model == I450T) {
} else if (model == A300CS || model == VTX ||
model == I450T || model == I750TC) {
parser->headersize = 5 * PAGESIZE;
}
@ -303,6 +305,7 @@ oceanic_atom2_parser_get_datetime (dc_parser_t *abstract, dc_datetime_t *datetim
case A300CS:
case VTX:
case I450T:
case I750TC:
datetime->year = (p[10]) + 2000;
datetime->month = (p[8]);
datetime->day = (p[9]);
@ -419,7 +422,8 @@ oceanic_atom2_parser_cache (oceanic_atom2_parser_t *parser)
o2_offset = 0x3E;
he_offset = 0x48;
ngasmixes = 6;
} else if (parser->model == A300CS || parser->model == VTX) {
} else if (parser->model == A300CS || parser->model == VTX ||
parser->model == I750TC) {
o2_offset = 0x2A;
if (data[0x39] & 0x04) {
ngasmixes = 1;
@ -573,7 +577,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
if (parser->mode != FREEDIVE) {
unsigned int idx = 0x17;
if (parser->model == A300CS || parser->model == VTX ||
parser->model == I450T)
parser->model == I450T || parser->model == I750TC)
idx = 0x1f;
switch (data[idx] & 0x03) {
case 0:
@ -627,7 +631,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
} else if (parser->model == OC1A || parser->model == OC1B ||
parser->model == OC1C || parser->model == OCI ||
parser->model == TX1 || parser->model == A300CS ||
parser->model == VTX || parser->model == I450T) {
parser->model == VTX || parser->model == I450T ||
parser->model == I750TC) {
samplesize = PAGESIZE;
}
@ -762,7 +767,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == A300AI || parser->model == VISION ||
parser->model == XPAIR) {
temperature = ((data[offset + 7] & 0xF0) >> 4) | ((data[offset + 7] & 0x0C) << 2) | ((data[offset + 5] & 0x0C) << 4);
} else if (parser->model == A300CS || parser->model == VTX) {
} else if (parser->model == A300CS || parser->model == VTX ||
parser->model == I750TC) {
temperature = data[offset + 11];
} else {
unsigned int sign;
@ -801,7 +807,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == AMPHOSAIR || parser->model == I550T ||
parser->model == VISION || parser->model == XPAIR)
pressure = (((data[offset + 0] & 0x03) << 8) + data[offset + 1]) * 5;
else if (parser->model == TX1 || parser->model == A300CS || parser->model == VTX)
else if (parser->model == TX1 || parser->model == A300CS ||
parser->model == VTX || parser->model == I750TC)
pressure = array_uint16_le (data + offset + 4);
else
pressure -= data[offset + 1];
@ -847,7 +854,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
// NDL / Deco
unsigned int have_deco = 0;
unsigned int decostop = 0, decotime = 0;
if (parser->model == A300CS || parser->model == VTX || parser->model == I450T) {
if (parser->model == A300CS || parser->model == VTX ||
parser->model == I450T || parser->model == I750TC) {
decostop = (data[offset + 15] & 0x70) >> 4;
decotime = array_uint16_le(data + offset + 6) & 0x03FF;
have_deco = 1;