Add support for a second Aeris Epic variant.
This commit is contained in:
parent
b3df32da9d
commit
328e929d4b
@ -130,6 +130,7 @@ static const dc_descriptor_t g_descriptors[] = {
|
||||
{"Hollis", "DG03", DC_FAMILY_OCEANIC_ATOM2, 0x444D},
|
||||
{"Oceanic", "OCS", DC_FAMILY_OCEANIC_ATOM2, 0x4450},
|
||||
{"Oceanic", "VT 4.1", DC_FAMILY_OCEANIC_ATOM2, 0x4452},
|
||||
{"Aeris", "Epic", DC_FAMILY_OCEANIC_ATOM2, 0x4453},
|
||||
{"Oceanic", "Atom 3.1", DC_FAMILY_OCEANIC_ATOM2, 0x4456},
|
||||
{"Sherwood", "Wisdom 3", DC_FAMILY_OCEANIC_ATOM2, 0x4358},
|
||||
/* Mares Nemo */
|
||||
|
||||
@ -66,7 +66,8 @@ static const device_backend_t oceanic_atom2_device_backend = {
|
||||
|
||||
static const unsigned char aeris_manta_version[] = "MANTA R\0\0 512K";
|
||||
static const unsigned char aeris_atmosai_version[] = "ATMOSAI R\0\0 512K";
|
||||
static const unsigned char aeris_epic_version[] = "2M EPIC r\0\0 512K";
|
||||
static const unsigned char aeris_epica_version[] = "2M EPIC r\0\0 512K";
|
||||
static const unsigned char aeris_epicb_version[] = "EPIC1 R\0\0 512K";
|
||||
static const unsigned char aeris_f10_version[] = "FREEWAER \0\0 512K";
|
||||
static const unsigned char oceanic_proplus2_version[] = "PROPLUS2 \0\0 512K";
|
||||
static const unsigned char oceanic_atom1_version[] = "ATOM rev\0\0 256K";
|
||||
@ -399,7 +400,8 @@ oceanic_atom2_device_open (dc_device_t **out, dc_context_t *context, const char
|
||||
oceanic_common_match (tusa_element2_version, device->version, sizeof (device->version)) ||
|
||||
oceanic_common_match (tusa_zen_version, device->version, sizeof (device->version)))
|
||||
device->base.layout = &oceanic_atom2b_layout;
|
||||
else if (oceanic_common_match (aeris_epic_version, device->version, sizeof (device->version)) ||
|
||||
else if (oceanic_common_match (aeris_epica_version, device->version, sizeof (device->version)) ||
|
||||
oceanic_common_match (aeris_epicb_version, device->version, sizeof (device->version)) ||
|
||||
oceanic_common_match (oceanic_atom2_version, device->version, sizeof (device->version)))
|
||||
device->base.layout = &oceanic_atom2c_layout;
|
||||
else if (oceanic_common_match (oceanic_veo1_version, device->version, sizeof (device->version)))
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include "array.h"
|
||||
|
||||
#define ATOM1 0x4250
|
||||
#define EPIC 0x4257
|
||||
#define EPICA 0x4257
|
||||
#define VT3 0x4258
|
||||
#define T3 0x4259
|
||||
#define ATOM2 0x4342
|
||||
@ -50,6 +50,7 @@
|
||||
#define DG03 0x444D
|
||||
#define OCS 0x4450
|
||||
#define VT41 0x4452
|
||||
#define EPICB 0x4453
|
||||
#define ATOM31 0x4456
|
||||
|
||||
typedef struct oceanic_atom2_parser_t oceanic_atom2_parser_t;
|
||||
@ -482,7 +483,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
|
||||
} else {
|
||||
// Tank pressure (2 psi) and number (one based index)
|
||||
tank = (data[offset + 1] & 0x03) - 1;
|
||||
if (parser->model == ATOM2 || parser->model == EPIC)
|
||||
if (parser->model == ATOM2 || parser->model == EPICA || parser->model == EPICB)
|
||||
pressure = (((data[offset + 3] << 8) + data[offset + 4]) & 0x0FFF) * 2;
|
||||
else
|
||||
pressure = (((data[offset + 4] << 8) + data[offset + 5]) & 0x0FFF) * 2;
|
||||
@ -522,7 +523,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
|
||||
unsigned int sign;
|
||||
if (parser->model == DG03)
|
||||
sign = (~data[offset + 5] & 0x04) >> 2;
|
||||
else if (parser->model == ATOM2 || parser->model == EPIC || parser->model == PROPLUS21)
|
||||
else if (parser->model == ATOM2 || parser->model == PROPLUS21 ||
|
||||
parser->model == EPICA || parser->model == EPICB)
|
||||
sign = (data[offset + 0] & 0x80) >> 7;
|
||||
else
|
||||
sign = (~data[offset + 0] & 0x80) >> 7;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user