From 40fc037aa4ce5d8ab9819b66233ef5ed8a9c5a96 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Thu, 9 Feb 2023 20:04:12 +1300 Subject: [PATCH] Fix handling of gas type for CCR dives. Fix bug introduced in #3576: On CCR dives cylinders listed as open circuit bailout by the dive computer need to be set to `OC_GAS`. Signed-off-by: Michael Keller --- core/libdivecomputer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index a8912bb66..baa250c5d 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -162,6 +162,7 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t cyl.type.size.mliter = lrint(tank.volume * 1000); cyl.type.workingpressure.mbar = lrint(tank.workpressure * 1000); + cyl.cylinder_use = OC_GAS; // libdivecomputer treats these as independent, but a tank cannot be used for diluent and O2 at the same time if (tank.type & DC_TANKINFO_CC_DILUENT) cyl.cylinder_use = DILUENT;