summaryrefslogtreecommitdiffstats
path: root/equipment.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2014-06-25 14:00:03 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-25 21:07:10 +0800
commit65c5d6815cf7c78231abd76440bb5bab54d9d51c (patch)
tree8f6820921ec40aeeeb5b475d74b7cfb567a782c7 /equipment.c
parentc7231adde1cddc64dfa47450393e97afa6c39d0f (diff)
downloadsubsurface-65c5d6815cf7c78231abd76440bb5bab54d9d51c.tar.gz
Make pO2 settings functional in planner
Spin boxes for pO2 are now hooked up to preference values. Adding new cylinders (or changing their fo2) computes the MOD accordin to the current value of decopo2. Note that chaning the limits for deco pO2 does _not_ automatically update the switch depth of all cylinders as those might have been manually entered. Furthermore, MOD has now to option of rounding to multiples of a given depth. That is used for the automatic switch depth which are now always multiples of 3m (so that EAN50 is switched to at 21m rather than 22m). Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'equipment.c')
-rw-r--r--equipment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/equipment.c b/equipment.c
index 020168064..6d09e6fab 100644
--- a/equipment.c
+++ b/equipment.c
@@ -241,7 +241,7 @@ void reset_cylinders(struct dive *dive)
if (cylinder_none(cyl))
continue;
if (cyl->depth.mm == 0) /* if the gas doesn't give a mod, assume conservative pO2 */
- cyl->depth = gas_mod(&cyl->gasmix, pO2);
+ cyl->depth = gas_mod(&cyl->gasmix, pO2, 3000);
if (cyl->type.workingpressure.mbar)
cyl->start.mbar = cyl->end.mbar = cyl->type.workingpressure.mbar;
cyl->gas_used.mliter = 0;