Add support for the Genesis React Pro White
The React Pro White appears to be a newer variant of the React Pro. For the communication it uses the newer atom2 protocol, but the data format remains (almost) the same as the older React Pro.
This commit is contained in:
parent
b185c1f62a
commit
f46e650a63
@ -131,6 +131,7 @@ static const dc_descriptor_t g_descriptors[] = {
|
||||
{"Oceanic", "OC1", DC_FAMILY_OCEANIC_ATOM2, 0x434E},
|
||||
{"Sherwood", "Wisdom 2", DC_FAMILY_OCEANIC_ATOM2, 0x4350},
|
||||
{"Sherwood", "Insight 2", DC_FAMILY_OCEANIC_ATOM2, 0x4353},
|
||||
{"Genesis", "React Pro White", DC_FAMILY_OCEANIC_ATOM2, 0x4354},
|
||||
{"Tusa", "Element II (IQ-750)", DC_FAMILY_OCEANIC_ATOM2, 0x4357},
|
||||
{"Oceanic", "Veo 1.0", DC_FAMILY_OCEANIC_ATOM2, 0x4358},
|
||||
{"Oceanic", "Veo 2.0", DC_FAMILY_OCEANIC_ATOM2, 0x4359},
|
||||
|
||||
@ -123,6 +123,10 @@ static const oceanic_common_version_t oceanic_veo1_version[] = {
|
||||
{"OCEVEO10 \0\0 8K"},
|
||||
};
|
||||
|
||||
static const oceanic_common_version_t oceanic_reactpro_version[] = {
|
||||
{"REACPRO2 \0\0 512K"},
|
||||
};
|
||||
|
||||
static const oceanic_common_layout_t aeris_f10_layout = {
|
||||
0x10000, /* memsize */
|
||||
0x0000, /* cf_devinfo */
|
||||
@ -240,6 +244,18 @@ static const oceanic_common_layout_t oceanic_veo1_layout = {
|
||||
0 /* pt_mode_logbook */
|
||||
};
|
||||
|
||||
static const oceanic_common_layout_t oceanic_reactpro_layout = {
|
||||
0xFFF0, /* memsize */
|
||||
0x0000, /* cf_devinfo */
|
||||
0x0040, /* cf_pointers */
|
||||
0x0400, /* rb_logbook_begin */
|
||||
0x0600, /* rb_logbook_end */
|
||||
8, /* rb_logbook_entry_size */
|
||||
0x0600, /* rb_profile_begin */
|
||||
0xFFF0, /* rb_profile_end */
|
||||
1, /* pt_mode_global */
|
||||
1 /* pt_mode_logbook */
|
||||
};
|
||||
|
||||
static int
|
||||
device_is_oceanic_atom2 (dc_device_t *abstract)
|
||||
@ -427,6 +443,8 @@ oceanic_atom2_device_open (dc_device_t **out, dc_context_t *context, const char
|
||||
device->base.layout = &oceanic_oc1_layout;
|
||||
} else if (OCEANIC_COMMON_MATCH (device->base.version, oceanic_veo1_version)) {
|
||||
device->base.layout = &oceanic_veo1_layout;
|
||||
} else if (OCEANIC_COMMON_MATCH (device->base.version, oceanic_reactpro_version)) {
|
||||
device->base.layout = &oceanic_reactpro_layout;
|
||||
} else {
|
||||
device->base.layout = &oceanic_default_layout;
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#define REACTPRO 0x4247
|
||||
#define VEO200 0x424B
|
||||
#define VEO250 0x424C
|
||||
#define REACTPROWHITE 0x4354
|
||||
|
||||
typedef struct oceanic_veo250_parser_t oceanic_veo250_parser_t;
|
||||
|
||||
@ -228,7 +229,7 @@ oceanic_veo250_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback
|
||||
unsigned int time = 0;
|
||||
unsigned int interval = 0;
|
||||
unsigned int interval_idx = data[0x27] & 0x03;
|
||||
if (parser->model == REACTPRO) {
|
||||
if (parser->model == REACTPRO || parser->model == REACTPROWHITE) {
|
||||
interval_idx += 1;
|
||||
interval_idx %= 4;
|
||||
}
|
||||
@ -275,7 +276,7 @@ oceanic_veo250_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback
|
||||
|
||||
// Temperature (°F)
|
||||
unsigned int temperature;
|
||||
if (parser->model == REACTPRO) {
|
||||
if (parser->model == REACTPRO || parser->model == REACTPROWHITE) {
|
||||
temperature = data[offset + 6];
|
||||
} else {
|
||||
temperature = data[offset + 7];
|
||||
|
||||
@ -35,6 +35,8 @@
|
||||
#include "parser-private.h"
|
||||
#include "device-private.h"
|
||||
|
||||
#define REACTPROWHITE 0x4354
|
||||
|
||||
dc_status_t
|
||||
dc_parser_new (dc_parser_t **out, dc_device_t *device)
|
||||
{
|
||||
@ -86,7 +88,10 @@ dc_parser_new (dc_parser_t **out, dc_device_t *device)
|
||||
rc = oceanic_veo250_parser_create (&parser, context, device->devinfo.model);
|
||||
break;
|
||||
case DC_FAMILY_OCEANIC_ATOM2:
|
||||
rc = oceanic_atom2_parser_create (&parser, context, device->devinfo.model);
|
||||
if (device->devinfo.model == REACTPROWHITE)
|
||||
rc = oceanic_veo250_parser_create (&parser, context, device->devinfo.model);
|
||||
else
|
||||
rc = oceanic_atom2_parser_create (&parser, context, device->devinfo.model);
|
||||
break;
|
||||
case DC_FAMILY_MARES_NEMO:
|
||||
case DC_FAMILY_MARES_PUCK:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user