Add support for the Oceanic F11.
This appears to be an Oceanic branded version of the Aeris F11.
This commit is contained in:
parent
0afa60bd97
commit
9520ecddbc
@ -179,6 +179,7 @@ static const dc_descriptor_t g_descriptors[] = {
|
||||
{"Aeris", "F11", DC_FAMILY_OCEANIC_ATOM2, 0x4549},
|
||||
{"Oceanic", "OCi", DC_FAMILY_OCEANIC_ATOM2, 0x454B},
|
||||
{"Aeris", "A300CS", DC_FAMILY_OCEANIC_ATOM2, 0x454C},
|
||||
{"Oceanic", "F11", DC_FAMILY_OCEANIC_ATOM2, 0x4554},
|
||||
{"Oceanic", "VTX", DC_FAMILY_OCEANIC_ATOM2, 0x4557},
|
||||
/* Mares Nemo */
|
||||
{"Mares", "Nemo", DC_FAMILY_MARES_NEMO, 0},
|
||||
|
||||
@ -86,7 +86,8 @@ static const oceanic_common_version_t aeris_f10_version[] = {
|
||||
};
|
||||
|
||||
static const oceanic_common_version_t aeris_f11_version[] = {
|
||||
{"AERISF11 \0\0 1024"},
|
||||
{"AERISF11 \0\0 1024"},
|
||||
{"OCEANF11 \0\0 1024"},
|
||||
};
|
||||
|
||||
static const oceanic_common_version_t oceanic_atom1_version[] = {
|
||||
|
||||
@ -70,9 +70,10 @@
|
||||
#define AMPHOS 0x4545
|
||||
#define AMPHOSAIR 0x4546
|
||||
#define PROPLUS3 0x4548
|
||||
#define F11 0x4549
|
||||
#define F11A 0x4549
|
||||
#define OCI 0x454B
|
||||
#define A300CS 0x454C
|
||||
#define F11B 0x4554
|
||||
#define VTX 0x4557
|
||||
|
||||
#define NORMAL 0
|
||||
@ -154,7 +155,7 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
|
||||
} else if (model == F10) {
|
||||
parser->headersize = 3 * PAGESIZE;
|
||||
parser->footersize = PAGESIZE / 2;
|
||||
} else if (model == F11) {
|
||||
} else if (model == F11A || model == F11B) {
|
||||
parser->headersize = 5 * PAGESIZE;
|
||||
parser->footersize = PAGESIZE / 2;
|
||||
} else if (model == A300CS || model == VTX) {
|
||||
@ -207,7 +208,8 @@ oceanic_atom2_parser_get_datetime (dc_parser_t *abstract, dc_datetime_t *datetim
|
||||
oceanic_atom2_parser_t *parser = (oceanic_atom2_parser_t *) abstract;
|
||||
|
||||
unsigned int header = 8;
|
||||
if (parser->model == F10 || parser->model == F11)
|
||||
if (parser->model == F10 || parser->model == F11A ||
|
||||
parser->model == F11B)
|
||||
header = 32;
|
||||
|
||||
if (abstract->size < header)
|
||||
@ -261,7 +263,8 @@ oceanic_atom2_parser_get_datetime (dc_parser_t *abstract, dc_datetime_t *datetim
|
||||
datetime->minute = bcd2dec (p[0]);
|
||||
break;
|
||||
case F10:
|
||||
case F11:
|
||||
case F11A:
|
||||
case F11B:
|
||||
datetime->year = bcd2dec (p[6]) + 2000;
|
||||
datetime->month = bcd2dec (p[7]);
|
||||
datetime->day = bcd2dec (p[8]);
|
||||
@ -361,7 +364,8 @@ oceanic_atom2_parser_cache (oceanic_atom2_parser_t *parser)
|
||||
|
||||
// Get the dive mode.
|
||||
unsigned int mode = NORMAL;
|
||||
if (parser->model == F10 || parser->model == F11) {
|
||||
if (parser->model == F10 || parser->model == F11A ||
|
||||
parser->model == F11B) {
|
||||
mode = FREEDIVE;
|
||||
} else if (parser->model == T3B || parser->model == VT3 ||
|
||||
parser->model == DG03) {
|
||||
@ -462,13 +466,15 @@ oceanic_atom2_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, uns
|
||||
if (value) {
|
||||
switch (type) {
|
||||
case DC_FIELD_DIVETIME:
|
||||
if (parser->model == F10 || parser->model == F11)
|
||||
if (parser->model == F10 || parser->model == F11A ||
|
||||
parser->model == F11B)
|
||||
*((unsigned int *) value) = bcd2dec (data[2]) + bcd2dec (data[3]) * 60 + bcd2dec (data[1]) * 3600;
|
||||
else
|
||||
*((unsigned int *) value) = parser->divetime;
|
||||
break;
|
||||
case DC_FIELD_MAXDEPTH:
|
||||
if (parser->model == F10 || parser->model == F11)
|
||||
if (parser->model == F10 || parser->model == F11A ||
|
||||
parser->model == F11B)
|
||||
*((double *) value) = array_uint16_le (data + 4) / 16.0 * FEET;
|
||||
else
|
||||
*((double *) value) = array_uint16_le (data + parser->footer + 4) / 16.0 * FEET;
|
||||
@ -555,7 +561,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
|
||||
|
||||
unsigned int samplesize = PAGESIZE / 2;
|
||||
if (parser->mode == FREEDIVE) {
|
||||
if (parser->model == F10 || parser->model == F11) {
|
||||
if (parser->model == F10 || parser->model == F11A ||
|
||||
parser->model == F11B) {
|
||||
samplesize = 2;
|
||||
} else {
|
||||
samplesize = 4;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user