Use the correct model number

The model number reported by the Scubapro G2 is 0x32.
This commit is contained in:
Jef Driesen 2017-06-23 06:55:14 +02:00
parent 7ee210f83f
commit 0a5623a949
3 changed files with 8 additions and 6 deletions

View File

@ -137,7 +137,7 @@ static const dc_descriptor_t g_descriptors[] = {
{"Scubapro", "Mantis 2", DC_FAMILY_UWATEC_MERIDIAN, 0x26},
/* Scubapro G2 */
#ifdef USBHID
{"Scubapro", "G2", DC_FAMILY_UWATEC_G2, 0x11},
{"Scubapro", "G2", DC_FAMILY_UWATEC_G2, 0x32},
#endif
/* Reefnet */
{"Reefnet", "Sensus", DC_FAMILY_REEFNET_SENSUS, 1},

View File

@ -98,10 +98,8 @@ dc_parser_new_internal (dc_parser_t **out, dc_context_t *context, dc_family_t fa
break;
case DC_FAMILY_UWATEC_SMART:
case DC_FAMILY_UWATEC_MERIDIAN:
rc = uwatec_smart_parser_create (&parser, context, model, devtime, systime);
break;
case DC_FAMILY_UWATEC_G2:
rc = uwatec_smart_parser_create (&parser, context, 0x11, devtime, systime);
rc = uwatec_smart_parser_create (&parser, context, model, devtime, systime);
break;
case DC_FAMILY_REEFNET_SENSUS:
rc = reefnet_sensus_parser_create (&parser, context, devtime, systime);

View File

@ -47,6 +47,7 @@
#define MERIDIAN 0x20
#define CHROMIS 0x24
#define MANTIS2 0x26
#define G2 0x32
#define UNSUPPORTED 0xFFFFFFFF
@ -500,7 +501,8 @@ uwatec_smart_parser_cache (uwatec_smart_parser_t *parser)
divemode != DC_DIVEMODE_FREEDIVE) {
if (parser->model == GALILEO || parser->model == GALILEOTRIMIX ||
parser->model == ALADIN2G || parser->model == MERIDIAN ||
parser->model == CHROMIS || parser->model == MANTIS2) {
parser->model == CHROMIS || parser->model == MANTIS2 ||
parser->model == G2) {
unsigned int offset = header->tankpressure + 2 * i;
endpressure = array_uint16_le(data + offset);
beginpressure = array_uint16_le(data + offset + 2 * header->ngases);
@ -578,6 +580,7 @@ uwatec_smart_parser_create (dc_parser_t **out, dc_context_t *context, unsigned i
case MERIDIAN:
case CHROMIS:
case MANTIS2:
case G2:
parser->headersize = 152;
parser->header = &uwatec_smart_galileo_header;
parser->samples = uwatec_smart_galileo_samples;
@ -928,7 +931,8 @@ uwatec_smart_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t
unsigned int id = 0;
if (parser->model == GALILEO || parser->model == GALILEOTRIMIX ||
parser->model == ALADIN2G || parser->model == MERIDIAN ||
parser->model == CHROMIS || parser->model == MANTIS2) {
parser->model == CHROMIS || parser->model == MANTIS2 ||
parser->model == G2) {
// Uwatec Galileo
id = uwatec_galileo_identify (data[offset]);
} else {