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 <github@ike.ch>
This commit is contained in:
Michael Keller 2023-07-09 14:51:39 +12:00 committed by bstoeger
parent 5e293689fd
commit cb6f768865
2 changed files with 5 additions and 1 deletions

View file

@ -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: added button to hide the infobox in the dive profile
desktop: use persisted device information for the dive computer configuration desktop: use persisted device information for the dive computer configuration
core: fix bug using salinity and pressure values in mbar <-> depth conversion core: fix bug using salinity and pressure values in mbar <-> depth conversion

View file

@ -151,7 +151,10 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t
cyl.gasmix.he.permille = he; 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; cyl.cylinder_use = DILUENT;
else else
cyl.cylinder_use = OC_GAS; cyl.cylinder_use = OC_GAS;