summaryrefslogtreecommitdiffstats
path: root/core/dive.c
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2016-07-06 22:40:31 +1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-07-09 12:08:06 -0700
commit9fbd11744f1bfffbc6973e0f9483ae1630dd8722 (patch)
tree3b4873ba46e85fb5f61cb87ce103aba1285231ae /core/dive.c
parent1ba61d7ad5025cf3bafc86705cf4c174aef8c264 (diff)
downloadsubsurface-9fbd11744f1bfffbc6973e0f9483ae1630dd8722.tar.gz
Add function to calculate gas maximum narcotic depth
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/dive.c')
-rw-r--r--core/dive.c2
1 files changed, 1 insertions, 1 deletions
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)