mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Profile heartrate: Nicer min/max values and tic distance
Correct a bug in finding the minimum heartrate. Use the minimum and maximum heartrate value to set min/max and tic distance for the heartrate axis in the profile. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
ea7f49031d
commit
b38eb45b29
2 changed files with 16 additions and 4 deletions
|
@ -439,7 +439,7 @@ struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer
|
|||
maxpressure = pressure;
|
||||
if (heartbeat > maxhr)
|
||||
maxhr = heartbeat;
|
||||
if (heartbeat < minhr)
|
||||
if (heartbeat && heartbeat < minhr)
|
||||
minhr = heartbeat;
|
||||
|
||||
if (depth > maxdepth)
|
||||
|
@ -469,7 +469,7 @@ struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer
|
|||
if (minpressure > maxpressure)
|
||||
minpressure = 0;
|
||||
if (minhr > maxhr)
|
||||
minhr = 0;
|
||||
minhr = maxhr;
|
||||
|
||||
memset(&pi, 0, sizeof(pi));
|
||||
pi.maxdepth = maxdepth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue