cylinders: use preferences modpO2 preferences value

Use the user-editable MOD-pO2 preferences value when creating
a default cylinder. It is not clear to me, when that even has
a consequence, but it looks like the right thing to do.

Reported-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-03-15 19:07:44 +01:00
parent 4ae87da58c
commit bbd3f0dd6d

View file

@ -397,7 +397,7 @@ void fill_default_cylinder(const struct dive *dive, cylinder_t *cyl)
{
const char *cyl_name = prefs.default_cylinder;
struct tank_info_t *ti = tank_info;
pressure_t pO2 = {.mbar = 1600};
pressure_t pO2 = {.mbar = lrint(prefs.modpO2 * 1000.0)};
if (!cyl_name)
return;