From fb417ee5b5c090203810a63ae9753464f753829e Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Sat, 7 Mar 2015 10:58:37 +0100 Subject: [PATCH] No gas mix support for the Galileo Trimix yet. For the Galileo Trimix we don't know yet where and how the gas mixes are stored. Right now, we just pretend there are no gas mixes available, which is misleading. --- src/uwatec_smart_parser.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/uwatec_smart_parser.c b/src/uwatec_smart_parser.c index 770fdb4..8a40b4b 100644 --- a/src/uwatec_smart_parser.c +++ b/src/uwatec_smart_parser.c @@ -400,11 +400,12 @@ uwatec_smart_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsi break; case DC_FIELD_GASMIX_COUNT: if (trimix) - *((unsigned int *) value) = 0; - else - *((unsigned int *) value) = table->ngases; + return DC_STATUS_UNSUPPORTED; + *((unsigned int *) value) = table->ngases; break; case DC_FIELD_GASMIX: + if (trimix) + return DC_STATUS_UNSUPPORTED; gasmix->helium = 0.0; gasmix->oxygen = data[table->gasmix + flags * 2] / 100.0; gasmix->nitrogen = 1.0 - gasmix->oxygen - gasmix->helium; @@ -704,7 +705,7 @@ uwatec_smart_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t sample.time = time; if (callback) callback (DC_SAMPLE_TIME, sample, userdata); - if (gasmix != gasmix_previous && !trimix) { + if (ngasmix && gasmix != gasmix_previous) { if (gasmix >= ngasmix) return DC_STATUS_DATAFORMAT; sample.event.type = SAMPLE_EVENT_GASCHANGE;