Add support for the Beuchat Mundial 2 and 3.
These two models use the same memory layout and data format as the Oceanic F10. Reported-By: Nick Shore <support@mac-dive.com>
This commit is contained in:
parent
3978dea153
commit
33f5206f79
@ -176,12 +176,14 @@ static const dc_descriptor_t g_descriptors[] = {
|
|||||||
{"Sherwood", "Wisdom 3", DC_FAMILY_OCEANIC_ATOM2, 0x4458},
|
{"Sherwood", "Wisdom 3", DC_FAMILY_OCEANIC_ATOM2, 0x4458},
|
||||||
{"Aeris", "A300", DC_FAMILY_OCEANIC_ATOM2, 0x445A},
|
{"Aeris", "A300", DC_FAMILY_OCEANIC_ATOM2, 0x445A},
|
||||||
{"Hollis", "TX1", DC_FAMILY_OCEANIC_ATOM2, 0x4542},
|
{"Hollis", "TX1", DC_FAMILY_OCEANIC_ATOM2, 0x4542},
|
||||||
|
{"Beuchat", "Mundial 2", DC_FAMILY_OCEANIC_ATOM2, 0x4543},
|
||||||
{"Sherwood", "Amphos", DC_FAMILY_OCEANIC_ATOM2, 0x4545},
|
{"Sherwood", "Amphos", DC_FAMILY_OCEANIC_ATOM2, 0x4545},
|
||||||
{"Sherwood", "Amphos Air", DC_FAMILY_OCEANIC_ATOM2, 0x4546},
|
{"Sherwood", "Amphos Air", DC_FAMILY_OCEANIC_ATOM2, 0x4546},
|
||||||
{"Oceanic", "Pro Plus 3", DC_FAMILY_OCEANIC_ATOM2, 0x4548},
|
{"Oceanic", "Pro Plus 3", DC_FAMILY_OCEANIC_ATOM2, 0x4548},
|
||||||
{"Aeris", "F11", DC_FAMILY_OCEANIC_ATOM2, 0x4549},
|
{"Aeris", "F11", DC_FAMILY_OCEANIC_ATOM2, 0x4549},
|
||||||
{"Oceanic", "OCi", DC_FAMILY_OCEANIC_ATOM2, 0x454B},
|
{"Oceanic", "OCi", DC_FAMILY_OCEANIC_ATOM2, 0x454B},
|
||||||
{"Aeris", "A300CS", DC_FAMILY_OCEANIC_ATOM2, 0x454C},
|
{"Aeris", "A300CS", DC_FAMILY_OCEANIC_ATOM2, 0x454C},
|
||||||
|
{"Beuchat", "Mundial 3", DC_FAMILY_OCEANIC_ATOM2, 0x4550},
|
||||||
{"Oceanic", "F11", DC_FAMILY_OCEANIC_ATOM2, 0x4554},
|
{"Oceanic", "F11", DC_FAMILY_OCEANIC_ATOM2, 0x4554},
|
||||||
{"Oceanic", "VTX", DC_FAMILY_OCEANIC_ATOM2, 0x4557},
|
{"Oceanic", "VTX", DC_FAMILY_OCEANIC_ATOM2, 0x4557},
|
||||||
{"Aqualung", "i450T", DC_FAMILY_OCEANIC_ATOM2, 0x4641},
|
{"Aqualung", "i450T", DC_FAMILY_OCEANIC_ATOM2, 0x4641},
|
||||||
|
|||||||
@ -83,6 +83,7 @@ static const dc_device_vtable_t oceanic_atom2_device_vtable = {
|
|||||||
|
|
||||||
static const oceanic_common_version_t aeris_f10_version[] = {
|
static const oceanic_common_version_t aeris_f10_version[] = {
|
||||||
{"FREEWAER \0\0 512K"},
|
{"FREEWAER \0\0 512K"},
|
||||||
|
{"MUNDIAL R\0\0 512K"},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const oceanic_common_version_t aeris_f11_version[] = {
|
static const oceanic_common_version_t aeris_f11_version[] = {
|
||||||
|
|||||||
@ -67,12 +67,14 @@
|
|||||||
#define WISDOM3 0x4458
|
#define WISDOM3 0x4458
|
||||||
#define A300 0x445A
|
#define A300 0x445A
|
||||||
#define TX1 0x4542
|
#define TX1 0x4542
|
||||||
|
#define MUNDIAL2 0x4543
|
||||||
#define AMPHOS 0x4545
|
#define AMPHOS 0x4545
|
||||||
#define AMPHOSAIR 0x4546
|
#define AMPHOSAIR 0x4546
|
||||||
#define PROPLUS3 0x4548
|
#define PROPLUS3 0x4548
|
||||||
#define F11A 0x4549
|
#define F11A 0x4549
|
||||||
#define OCI 0x454B
|
#define OCI 0x454B
|
||||||
#define A300CS 0x454C
|
#define A300CS 0x454C
|
||||||
|
#define MUNDIAL3 0x4550
|
||||||
#define F11B 0x4554
|
#define F11B 0x4554
|
||||||
#define VTX 0x4557
|
#define VTX 0x4557
|
||||||
#define I450T 0x4641
|
#define I450T 0x4641
|
||||||
@ -153,7 +155,7 @@ oceanic_atom2_parser_create (dc_parser_t **out, dc_context_t *context, unsigned
|
|||||||
parser->headersize += 2 * PAGESIZE;
|
parser->headersize += 2 * PAGESIZE;
|
||||||
} else if (model == ATOM1) {
|
} else if (model == ATOM1) {
|
||||||
parser->headersize -= 2 * PAGESIZE;
|
parser->headersize -= 2 * PAGESIZE;
|
||||||
} else if (model == F10) {
|
} else if (model == F10 || model == MUNDIAL2 || model == MUNDIAL3) {
|
||||||
parser->headersize = 3 * PAGESIZE;
|
parser->headersize = 3 * PAGESIZE;
|
||||||
parser->footersize = 0;
|
parser->footersize = 0;
|
||||||
} else if (model == F11A || model == F11B) {
|
} else if (model == F11A || model == F11B) {
|
||||||
@ -210,7 +212,8 @@ oceanic_atom2_parser_get_datetime (dc_parser_t *abstract, dc_datetime_t *datetim
|
|||||||
|
|
||||||
unsigned int header = 8;
|
unsigned int header = 8;
|
||||||
if (parser->model == F10 || parser->model == F11A ||
|
if (parser->model == F10 || parser->model == F11A ||
|
||||||
parser->model == F11B)
|
parser->model == F11B || parser->model == MUNDIAL2 ||
|
||||||
|
parser->model == MUNDIAL3)
|
||||||
header = 32;
|
header = 32;
|
||||||
|
|
||||||
if (abstract->size < header)
|
if (abstract->size < header)
|
||||||
@ -268,6 +271,8 @@ oceanic_atom2_parser_get_datetime (dc_parser_t *abstract, dc_datetime_t *datetim
|
|||||||
case F10:
|
case F10:
|
||||||
case F11A:
|
case F11A:
|
||||||
case F11B:
|
case F11B:
|
||||||
|
case MUNDIAL2:
|
||||||
|
case MUNDIAL3:
|
||||||
datetime->year = bcd2dec (p[6]) + 2000;
|
datetime->year = bcd2dec (p[6]) + 2000;
|
||||||
datetime->month = bcd2dec (p[7]);
|
datetime->month = bcd2dec (p[7]);
|
||||||
datetime->day = bcd2dec (p[8]);
|
datetime->day = bcd2dec (p[8]);
|
||||||
@ -369,7 +374,8 @@ oceanic_atom2_parser_cache (oceanic_atom2_parser_t *parser)
|
|||||||
// Get the dive mode.
|
// Get the dive mode.
|
||||||
unsigned int mode = NORMAL;
|
unsigned int mode = NORMAL;
|
||||||
if (parser->model == F10 || parser->model == F11A ||
|
if (parser->model == F10 || parser->model == F11A ||
|
||||||
parser->model == F11B) {
|
parser->model == F11B || parser->model == MUNDIAL2 ||
|
||||||
|
parser->model == MUNDIAL3) {
|
||||||
mode = FREEDIVE;
|
mode = FREEDIVE;
|
||||||
} else if (parser->model == T3B || parser->model == VT3 ||
|
} else if (parser->model == T3B || parser->model == VT3 ||
|
||||||
parser->model == DG03) {
|
parser->model == DG03) {
|
||||||
@ -474,14 +480,16 @@ oceanic_atom2_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, uns
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case DC_FIELD_DIVETIME:
|
case DC_FIELD_DIVETIME:
|
||||||
if (parser->model == F10 || parser->model == F11A ||
|
if (parser->model == F10 || parser->model == F11A ||
|
||||||
parser->model == F11B)
|
parser->model == F11B || parser->model == MUNDIAL2 ||
|
||||||
|
parser->model == MUNDIAL3)
|
||||||
*((unsigned int *) value) = bcd2dec (data[2]) + bcd2dec (data[3]) * 60;
|
*((unsigned int *) value) = bcd2dec (data[2]) + bcd2dec (data[3]) * 60;
|
||||||
else
|
else
|
||||||
*((unsigned int *) value) = parser->divetime;
|
*((unsigned int *) value) = parser->divetime;
|
||||||
break;
|
break;
|
||||||
case DC_FIELD_MAXDEPTH:
|
case DC_FIELD_MAXDEPTH:
|
||||||
if (parser->model == F10 || parser->model == F11A ||
|
if (parser->model == F10 || parser->model == F11A ||
|
||||||
parser->model == F11B)
|
parser->model == F11B || parser->model == MUNDIAL2 ||
|
||||||
|
parser->model == MUNDIAL3)
|
||||||
*((double *) value) = array_uint16_le (data + 4) / 16.0 * FEET;
|
*((double *) value) = array_uint16_le (data + 4) / 16.0 * FEET;
|
||||||
else
|
else
|
||||||
*((double *) value) = array_uint16_le (data + parser->footer + 4) / 16.0 * FEET;
|
*((double *) value) = array_uint16_le (data + parser->footer + 4) / 16.0 * FEET;
|
||||||
@ -594,7 +602,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
|
|||||||
unsigned int samplesize = PAGESIZE / 2;
|
unsigned int samplesize = PAGESIZE / 2;
|
||||||
if (parser->mode == FREEDIVE) {
|
if (parser->mode == FREEDIVE) {
|
||||||
if (parser->model == F10 || parser->model == F11A ||
|
if (parser->model == F10 || parser->model == F11A ||
|
||||||
parser->model == F11B) {
|
parser->model == F11B || parser->model == MUNDIAL2 ||
|
||||||
|
parser->model == MUNDIAL3) {
|
||||||
samplesize = 2;
|
samplesize = 2;
|
||||||
} else {
|
} else {
|
||||||
samplesize = 4;
|
samplesize = 4;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user