Merge branch 'master' of git://github.com/libdivecomputer/libdivecomputer into Subsurface-NG
Pull Aqualung i100 support from Jef's upstream libdivecomputer. Very similar to the I200, but with the header in a different location. * 'master' of git://github.com/libdivecomputer/libdivecomputer: Add support for the Aqualung i100
This commit is contained in:
commit
f705ddefa8
@ -220,6 +220,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", "i100", DC_FAMILY_OCEANIC_ATOM2, 0x464E, DC_TRANSPORT_SERIAL, NULL},
|
||||
/* Mares Nemo */
|
||||
{"Mares", "Nemo", DC_FAMILY_MARES_NEMO, 0, DC_TRANSPORT_SERIAL, NULL},
|
||||
{"Mares", "Nemo Steel", DC_FAMILY_MARES_NEMO, 0, DC_TRANSPORT_SERIAL, NULL},
|
||||
|
||||
@ -119,6 +119,7 @@ static const oceanic_common_version_t oceanic_atom2b_version[] = {
|
||||
{"TUSAZEN \0\0 512K"},
|
||||
{"AQUAI300 \0\0 512K"},
|
||||
{"HOLLDG03 \0\0 512K"},
|
||||
{"AQUAI100 \0\0 512K"},
|
||||
};
|
||||
|
||||
static const oceanic_common_version_t oceanic_atom2c_version[] = {
|
||||
|
||||
@ -88,6 +88,7 @@
|
||||
#define I450T 0x4641
|
||||
#define I550 0x4642
|
||||
#define I200 0x4646
|
||||
#define I100 0x464E
|
||||
|
||||
#define NORMAL 0
|
||||
#define GAUGE 1
|
||||
@ -166,7 +167,7 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
|
||||
parser->headersize += PAGESIZE;
|
||||
} else if (model == TX1) {
|
||||
parser->headersize += 2 * PAGESIZE;
|
||||
} else if (model == ATOM1) {
|
||||
} else if (model == ATOM1 || model == I100) {
|
||||
parser->headersize -= 2 * PAGESIZE;
|
||||
} else if (model == F10A || model == F10B ||
|
||||
model == MUNDIAL2 || model == MUNDIAL3) {
|
||||
@ -276,6 +277,7 @@ oceanic_atom2_parser_get_datetime (dc_parser_t *abstract, dc_datetime_t *datetim
|
||||
case INSIGHT2:
|
||||
case I300:
|
||||
case I200:
|
||||
case I100:
|
||||
datetime->year = ((p[3] & 0xE0) >> 1) + (p[4] & 0x0F) + 2000;
|
||||
datetime->month = (p[4] & 0xF0) >> 4;
|
||||
datetime->day = p[3] & 0x1F;
|
||||
@ -714,7 +716,7 @@ 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 == I200 || parser->model == I100) {
|
||||
have_pressure = 0;
|
||||
}
|
||||
|
||||
@ -869,7 +871,7 @@ 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 == I200 || parser->model == I100) {
|
||||
temperature = data[offset + 3];
|
||||
} else if (parser->model == OCS || parser->model == TX1) {
|
||||
temperature = data[offset + 1];
|
||||
@ -938,7 +940,7 @@ 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 == I200 || parser->model == I100)
|
||||
depth = (data[offset + 4] + (data[offset + 5] << 8)) & 0x0FFF;
|
||||
else if (parser->model == ATOM1)
|
||||
depth = data[offset + 3] * 16;
|
||||
@ -988,7 +990,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
|
||||
have_deco = 1;
|
||||
} else if (parser->model == I200 || parser->model == I300 ||
|
||||
parser->model == OC1A || parser->model == OC1B ||
|
||||
parser->model == OC1C || parser->model == OCI) {
|
||||
parser->model == OC1C || parser->model == OCI ||
|
||||
parser->model == I100) {
|
||||
decostop = (data[offset + 7] & 0xF0) >> 4;
|
||||
decotime = array_uint16_le(data + offset + 6) & 0x0FFF;
|
||||
have_deco = 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user