Add support for the Sherwood Amphos 2.0

This commit is contained in:
Nick Shore 2021-05-01 21:31:48 +02:00 committed by Jef Driesen
parent d85d8811f0
commit 37c4203537
3 changed files with 6 additions and 1 deletions

View File

@ -265,6 +265,7 @@ static const dc_descriptor_t g_descriptors[] = {
{"Oceanic", "Veo 4.0", DC_FAMILY_OCEANIC_ATOM2, 0x4654, DC_TRANSPORT_SERIAL | DC_TRANSPORT_BLE, dc_filter_oceanic},
{"Sherwood", "Wisdom 4", DC_FAMILY_OCEANIC_ATOM2, 0x4655, DC_TRANSPORT_SERIAL | DC_TRANSPORT_BLE, dc_filter_oceanic},
{"Oceanic", "Pro Plus 4", DC_FAMILY_OCEANIC_ATOM2, 0x4656, DC_TRANSPORT_SERIAL | DC_TRANSPORT_BLE, dc_filter_oceanic},
{"Sherwood", "Amphos 2.0", DC_FAMILY_OCEANIC_ATOM2, 0x4657, DC_TRANSPORT_SERIAL, NULL},
{"Sherwood", "Beacon", DC_FAMILY_OCEANIC_ATOM2, 0x4742, DC_TRANSPORT_SERIAL | DC_TRANSPORT_BLE, dc_filter_oceanic},
{"Aqualung", "i470TC", DC_FAMILY_OCEANIC_ATOM2, 0x4743, DC_TRANSPORT_SERIAL | DC_TRANSPORT_BLE, dc_filter_oceanic},
/* Mares Nemo */

View File

@ -459,6 +459,7 @@ static const oceanic_common_version_t versions[] = {
{"AMPHOAIR \0\0 512K", 0, &tusa_zenair_layout},
{"VOYAGE2G \0\0 512K", 0, &tusa_zenair_layout},
{"TUSTALIS \0\0 512K", 0, &tusa_zenair_layout},
{"AMPHOS20 \0\0 512K", 0, &tusa_zenair_layout},
{"REACPRO2 \0\0 512K", 0, &oceanic_reactpro_layout},

View File

@ -97,6 +97,7 @@
#define VEO40 0x4654
#define WISDOM4 0x4655
#define PROPLUS4 0x4656
#define AMPHOS2 0x4657
#define BEACON 0x4742
#define I470TC 0x4743
@ -312,6 +313,7 @@ oceanic_atom2_parser_get_datetime (dc_parser_t *abstract, dc_datetime_t *datetim
case AMPHOSAIR:
case VOYAGER2G:
case TALIS:
case AMPHOS2:
datetime->year = (p[3] & 0x1F) + 2000;
datetime->month = (p[7] & 0xF0) >> 4;
datetime->day = ((p[3] & 0x80) >> 3) + ((p[5] & 0xF0) >> 4);
@ -930,7 +932,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == PROPLUS4 || parser->model == WISDOM4)
sign = (~data[offset + 5] & 0x04) >> 2;
else if (parser->model == VOYAGER2G || parser->model == AMPHOS ||
parser->model == AMPHOSAIR || parser->model == ZENAIR)
parser->model == AMPHOSAIR || parser->model == ZENAIR ||
parser->model == AMPHOS2)
sign = (data[offset + 5] & 0x04) >> 2;
else if (parser->model == ATOM2 || parser->model == PROPLUS21 ||
parser->model == EPICA || parser->model == EPICB ||