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 <github@ike.ch>
This commit is contained in:
Michael Keller 2023-03-17 10:11:37 +13:00
parent 4ddef92b80
commit 8b5b86fb4e

View File

@ -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;
}