Ignore the diluents for open-circuit dives

For open-circuit dives it makes no sense to also include the configured
diluents. Usually those diluents are only present because the diver uses
the same dive computer for both open and closed circuit dives.
This commit is contained in:
Jef Driesen 2023-07-05 23:54:16 +02:00
parent 3d82d6796f
commit ff0328537e

View File

@ -659,6 +659,9 @@ shearwater_predator_parser_cache (shearwater_predator_parser_t *parser)
for (unsigned int i = 0; i < ngasmixes; ++i) {
if (gasmix[i].oxygen == 0 && gasmix[i].helium == 0)
continue;
if (gasmix[i].diluent &&
(divemode != M_CC && divemode != M_CC2 && divemode != M_SC))
continue;
parser->gasmix[parser->ngasmixes] = gasmix[i];
parser->ngasmixes++;
}