From bbd3f0dd6d019245b7708b867e7f4c6522332443 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 15 Mar 2020 19:07:44 +0100 Subject: 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 Signed-off-by: Berthold Stoeger --- core/equipment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/equipment.c b/core/equipment.c index 24d1d826b..494baf5c1 100644 --- a/core/equipment.c +++ b/core/equipment.c @@ -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; -- cgit v1.2.3-70-g09d2