From a7d18a9fa649e1f6e9b7d553e286abce8a430b9a Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Mon, 6 Jul 2015 00:07:39 +0200 Subject: Round MOD of gas rather than truncate For the proper calculation, we need to take salinity and surface pressure into account (rather than depth = bar * 10 - 10) Signed-off-by: Robert C. Helling Signed-off-by: Dirk Hohndel --- equipment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'equipment.c') diff --git a/equipment.c b/equipment.c index aebac5120..47c439735 100644 --- a/equipment.c +++ b/equipment.c @@ -226,7 +226,7 @@ void reset_cylinders(struct dive *dive, bool track_gas) if (cylinder_none(cyl)) continue; if (cyl->depth.mm == 0) /* if the gas doesn't give a mod, calculate based on prefs */ - cyl->depth = gas_mod(&cyl->gasmix, decopo2, M_OR_FT(3,10)); + cyl->depth = gas_mod(&cyl->gasmix, decopo2, dive, M_OR_FT(3,10)); if (track_gas) cyl->start.mbar = cyl->end.mbar = cyl->type.workingpressure.mbar; cyl->gas_used.mliter = 0; -- cgit v1.2.3-70-g09d2