From bcb2925a258d7ed86fd77d9d0888c9a06e9ed673 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Sat, 7 Mar 2015 10:07:35 +0100 Subject: [PATCH] Fix the Galileo trimix detection. Originally, I assumed that the trimix firmware update changed the model number from 0x11 (Galileo) to 0x19 (Galileo Trimix). But that assumption appears to be wrong because I received data from a Galileo with model number 0x11, but with the trimix data format. Another explanation might be that the trimix data format is not specific to the trimix firmware. Anyway, this is easily fixed by treating both models identically. --- src/uwatec_smart_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uwatec_smart_parser.c b/src/uwatec_smart_parser.c index c2a09cf..770fdb4 100644 --- a/src/uwatec_smart_parser.c +++ b/src/uwatec_smart_parser.c @@ -375,7 +375,7 @@ uwatec_smart_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsi unsigned int header = parser->headersize; unsigned int trimix = 0; - if (parser->model == GALILEOTRIMIX) { + if (parser->model == GALILEO || parser->model == GALILEOTRIMIX) { if (size < 44) return DC_STATUS_DATAFORMAT; @@ -501,7 +501,7 @@ uwatec_smart_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t unsigned int header = parser->headersize; unsigned int trimix = 0; - if (parser->model == GALILEOTRIMIX) { + if (parser->model == GALILEO || parser->model == GALILEOTRIMIX) { if (size < 44) return DC_STATUS_DATAFORMAT;