From 912560f928e68fb1235b17ed4bb06eb8d19a8ae7 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 16 Jul 2014 23:04:30 -0700 Subject: Planner: don't track cylinder pressure if working pressure is 0 The pressure graph will go from 0 to negative - one could make a weak argument that this would at least tell you how much pressure you'd need in the cylinder to start with, but that's kinda lame. Fixes #615 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 66427324e..14d02df77 100644 --- a/equipment.c +++ b/equipment.c @@ -243,7 +243,7 @@ void reset_cylinders(struct dive *dive, bool track_gas) continue; if (cyl->depth.mm == 0) /* if the gas doesn't give a mod, assume conservative pO2 */ cyl->depth = gas_mod(&cyl->gasmix, pO2, M_OR_FT(3,10)); - if (track_gas && cyl->type.workingpressure.mbar) + if (track_gas) cyl->start.mbar = cyl->end.mbar = cyl->type.workingpressure.mbar; cyl->gas_used.mliter = 0; cyl->deco_gas_used.mliter = 0; -- cgit v1.2.3-70-g09d2