diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-04-28 22:47:56 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-28 14:15:08 -0700 |
commit | e5ce55ed6c19f26a55b8b3f189820c2c9c487023 (patch) | |
tree | 0aa66d30f4d18ac2f955619e85c89ac7b8859ef0 /profile.c | |
parent | 4f20bb9fb2731fdfd9faab3b109a0cbce8c89298 (diff) | |
download | subsurface-e5ce55ed6c19f26a55b8b3f189820c2c9c487023.tar.gz |
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>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 */ |