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 <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-04-28 22:47:56 +03:00 committed by Dirk Hohndel
parent 4f20bb9fb2
commit e5ce55ed6c

View file

@ -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 */