mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
1d09ce2ce2
commit
b1869c619a
1 changed files with 3 additions and 1 deletions
|
@ -174,6 +174,7 @@ void fill_default_cylinder(cylinder_t *cyl)
|
||||||
{
|
{
|
||||||
const char *cyl_name = prefs.default_cylinder;
|
const char *cyl_name = prefs.default_cylinder;
|
||||||
struct tank_info_t *ti = tank_info;
|
struct tank_info_t *ti = tank_info;
|
||||||
|
pressure_t pO2 = {.mbar = 1600};
|
||||||
|
|
||||||
if (!cyl_name)
|
if (!cyl_name)
|
||||||
return;
|
return;
|
||||||
|
@ -194,7 +195,8 @@ void fill_default_cylinder(cylinder_t *cyl)
|
||||||
if (ti->psi)
|
if (ti->psi)
|
||||||
cyl->type.size.mliter = cuft_to_l(ti->cuft) * 1000 / bar_to_atm(psi_to_bar(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
|
/* make sure that the gas we are switching to is represented in our
|
||||||
|
|
Loading…
Add table
Reference in a new issue