summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-06-30 20:26:18 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-01 09:38:15 -0700
commitb1869c619a25162934bb67e6b0930635c636837a (patch)
treee1ee5c5cc18e2c46b809d643c9e164624b557505 /planner.c
parent1d09ce2ce287b5e6b7fdc27e327eff8f2ac5fe90 (diff)
downloadsubsurface-b1869c619a25162934bb67e6b0930635c636837a.tar.gz
Use gas_mod helper instead of local version
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/planner.c b/planner.c
index 2f3f3def5..f74d66fd9 100644
--- a/planner.c
+++ b/planner.c
@@ -174,6 +174,7 @@ void fill_default_cylinder(cylinder_t *cyl)
{
const char *cyl_name = prefs.default_cylinder;
struct tank_info_t *ti = tank_info;
+ pressure_t pO2 = {.mbar = 1600};
if (!cyl_name)
return;
@@ -194,7 +195,8 @@ void fill_default_cylinder(cylinder_t *cyl)
if (ti->psi)
cyl->type.size.mliter = cuft_to_l(ti->cuft) * 1000 / bar_to_atm(psi_to_bar(ti->psi));
}
- cyl->depth.mm = 1600 * 1000 / O2_IN_AIR * 10 - 10000; // MOD of air
+ // MOD of air
+ cyl->depth = gas_mod(&cyl->gasmix, pO2, 1);
}
/* make sure that the gas we are switching to is represented in our