diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2016-05-21 19:32:09 +1000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-05-21 07:03:38 -0700 |
commit | 9b29173363861861949814191861fa46e255c349 (patch) | |
tree | 9fdb002a18d775a75b7d9264a81f11d7d8a43118 /core/dive.c | |
parent | 67dda48c884b7413e46acde4e890c0fa19640f67 (diff) | |
download | subsurface-9b29173363861861949814191861fa46e255c349.tar.gz |
Planner: add best mix EAD preference
Add best mix EAD preference and UI, along with a tooltip describing what it
does
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/dive.c b/core/dive.c index 6d5ba1dbb..c4f5dd778 100644 --- a/core/dive.c +++ b/core/dive.c @@ -3653,9 +3653,8 @@ fraction_t best_o2(depth_t depth, struct dive *dive) fraction_t best_He(depth_t depth, struct dive *dive) { fraction_t fhe; - int ead = 30000; //this should be user-configurable int pnarcotic, ambient; - pnarcotic = depth_to_mbar(ead, dive); + pnarcotic = depth_to_mbar(prefs.bestmixead, 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) |