mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:23:24 +00:00
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:
parent
4f20bb9fb2
commit
e5ce55ed6c
1 changed files with 2 additions and 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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue