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>
This commit is contained in:
Rick Walsh 2016-05-21 19:32:09 +10:00 committed by Dirk Hohndel
parent 67dda48c88
commit 9b29173363
8 changed files with 62 additions and 4 deletions

View file

@ -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)