Don't attempt to compute SAC for CCR dives

CCRs are different. It does not make sense to compute
a depth dependent SAC. You could compute the rate of O2
consumption but even that is likely wrong (as O2 in the
diluent would enter that as well), so simply don't attempt
it.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2021-11-14 03:55:33 +01:00 committed by Dirk Hohndel
parent cfd6a1634f
commit 07745893e5
4 changed files with 8 additions and 3 deletions

View file

@ -348,6 +348,10 @@ static double calculate_airuse(const struct dive *dive)
int airuse = 0;
int i;
// SAC for a CCR dive does not make sense.
if (dive->dc.divemode == CCR)
return 0.0;
for (i = 0; i < dive->cylinders.nr; i++) {
pressure_t start, end;
const cylinder_t *cyl = get_cylinder(dive, i);