From 8b5b86fb4eb41b61faced5d1b643d829b8b5b206 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Fri, 17 Mar 2023 10:11:37 +1300 Subject: [PATCH] HW: Apply the OSTC4 gas index offset to all HW computers. Apply the gasmix index offset used by the OSTC4 on CCR dives to all Heinrichs Weikamp computers and all dive types. Signed-off-by: Michael Keller --- src/hw_ostc_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hw_ostc_parser.c b/src/hw_ostc_parser.c index fea219d..4ad12ab 100644 --- a/src/hw_ostc_parser.c +++ b/src/hw_ostc_parser.c @@ -1057,7 +1057,7 @@ hw_ostc_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t call return DC_STATUS_DATAFORMAT; } unsigned int idx = data[offset]; - if (parser->model == OSTC4 && ccr && idx > parser->nfixed && idx <= parser->nfixed + OSTC4_CC_DILUENT_GAS_OFFSET) { + if (idx > parser->nfixed && idx <= parser->nfixed + OSTC4_CC_DILUENT_GAS_OFFSET) { // OSTC4 reports gas changes to another diluent with an offset idx -= OSTC4_CC_DILUENT_GAS_OFFSET; }