From e5ce55ed6c19f26a55b8b3f189820c2c9c487023 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Mon, 28 Apr 2014 22:47:56 +0300 Subject: Set minpressure from manually added cylinders This includes minimum pressure from manually added cylinders to be taken into account on scaling. Without this, manually added cylinders might lead to pressure dropping below the Y axis 0 line (e.g. when first "computerized" cylinder is 220->140 and second, manually added cylinder, 200->50 bar). Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- profile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'profile.c') diff --git a/profile.c b/profile.c index f5d287bfd..373ac8eb3 100644 --- a/profile.c +++ b/profile.c @@ -686,6 +686,8 @@ struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer unsigned int mbar = dive->cylinder[cyl].start.mbar; if (mbar > maxpressure) maxpressure = mbar; + if (mbar < minpressure) + minpressure = mbar; } /* Then do all the samples from all the dive computers */ -- cgit v1.2.3-70-g09d2