From 9fbd11744f1bfffbc6973e0f9483ae1630dd8722 Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Wed, 6 Jul 2016 22:40:31 +1000 Subject: Add function to calculate gas maximum narcotic depth Signed-off-by: Rick Walsh Signed-off-by: Dirk Hohndel --- core/dive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/dive.c') diff --git a/core/dive.c b/core/dive.c index 29198afd6..9db233dca 100644 --- a/core/dive.c +++ b/core/dive.c @@ -3661,7 +3661,7 @@ fraction_t best_He(depth_t depth, struct dive *dive) { fraction_t fhe; int pnarcotic, ambient; - pnarcotic = depth_to_mbar(prefs.bestmixend, dive); + pnarcotic = depth_to_mbar(prefs.bestmixend.mm, dive); ambient = depth_to_mbar(depth.mm, dive); fhe.permille = (100 - 100 * pnarcotic / ambient) * 10; //use integer arithmetic to round up to nearest percent if (fhe.permille < 0) -- cgit v1.2.3-70-g09d2