Only calculate crushing pressure in VPM-B mode

Don't do this expensive calculation when not needed.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2015-09-20 07:52:14 +02:00 committed by Dirk Hohndel
parent a77d1a3f56
commit 28c1dc754d

1
deco.c
View file

@ -511,6 +511,7 @@ void add_segment(double pressure, const struct gasmix *gasmix, int period_in_sec
tissue_n2_sat[ci] += n2_satmult * pn2_oversat * n2_f;
tissue_he_sat[ci] += he_satmult * phe_oversat * he_f;
}
if(prefs.deco_mode == VPMB && in_planner())
calc_crushing_pressure(pressure);
return;
}