From 769d90aca272aba030c7d55abb38c0b1e979479c Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Sun, 14 Aug 2016 10:07:45 +0200 Subject: [PATCH] Add support for the Scubapro Mantis 2. --- src/descriptor.c | 1 + src/uwatec_smart_parser.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/descriptor.c b/src/descriptor.c index 5ea305d..a8ed958 100644 --- a/src/descriptor.c +++ b/src/descriptor.c @@ -117,6 +117,7 @@ static const dc_descriptor_t g_descriptors[] = { {"Scubapro", "Meridian", DC_FAMILY_UWATEC_MERIDIAN, 0x20}, {"Scubapro", "Mantis", DC_FAMILY_UWATEC_MERIDIAN, 0x20}, {"Scubapro", "Chromis", DC_FAMILY_UWATEC_MERIDIAN, 0x24}, + {"Scubapro", "Mantis 2", DC_FAMILY_UWATEC_MERIDIAN, 0x26}, /* Reefnet */ {"Reefnet", "Sensus", DC_FAMILY_REEFNET_SENSUS, 1}, {"Reefnet", "Sensus Pro", DC_FAMILY_REEFNET_SENSUSPRO, 2}, diff --git a/src/uwatec_smart_parser.c b/src/uwatec_smart_parser.c index 1920245..d0ed765 100644 --- a/src/uwatec_smart_parser.c +++ b/src/uwatec_smart_parser.c @@ -46,6 +46,7 @@ #define SMARTZ 0x1C #define MERIDIAN 0x20 #define CHROMIS 0x24 +#define MANTIS2 0x26 #define UNSUPPORTED 0xFFFFFFFF @@ -463,7 +464,7 @@ uwatec_smart_parser_cache (uwatec_smart_parser_t *parser) if (header->tankpressure != UNSUPPORTED) { if (parser->model == GALILEO || parser->model == GALILEOTRIMIX || parser->model == ALADIN2G || parser->model == MERIDIAN || - parser->model == CHROMIS) { + parser->model == CHROMIS || parser->model == MANTIS2) { unsigned int offset = header->tankpressure + 2 * i; endpressure = array_uint16_le(data + offset); beginpressure = array_uint16_le(data + offset + 2 * header->ngases); @@ -547,6 +548,7 @@ uwatec_smart_parser_create (dc_parser_t **out, dc_context_t *context, unsigned i case ALADIN2G: case MERIDIAN: case CHROMIS: + case MANTIS2: parser->headersize = 152; parser->header = &uwatec_smart_galileo_header; parser->samples = uwatec_smart_galileo_samples; @@ -891,7 +893,7 @@ 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 == CHROMIS || parser->model == MANTIS2) { // Uwatec Galileo id = uwatec_galileo_identify (data[offset]); } else {