From cb6f768865f90c15efbec0dcb36011a76bf798cf Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Sun, 9 Jul 2023 14:51:39 +1200 Subject: [PATCH] Equipment: Mark Gas Mixes Reported as 'inactive' as 'not used. Mark gases that are reported as 'inactive' by the dive computer as 'not used' in the Equipment tab. Requires https://github.com/subsurface/libdc/pull/52. Signed-off-by: Michael Keller --- CHANGELOG.md | 1 + core/libdivecomputer.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 858021a39..c624387b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +equipment: mark gas mixes reported by the dive computer as 'inactive' as 'not used' desktop: added button to hide the infobox in the dive profile desktop: use persisted device information for the dive computer configuration core: fix bug using salinity and pressure values in mbar <-> depth conversion diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index bc4d06210..94988c516 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -151,7 +151,10 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t cyl.gasmix.he.permille = he; } - if (dive->dc.divemode == CCR) + if (rc == DC_STATUS_UNSUPPORTED) + // Gasmix is inactive + cyl.cylinder_use = NOT_USED; + else if (dive->dc.divemode == CCR) cyl.cylinder_use = DILUENT; else cyl.cylinder_use = OC_GAS;