From b38eb45b295aaa346ad58e7ba3677456469a2fdd Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Thu, 15 Mar 2018 23:12:45 +0100 Subject: 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 --- core/profile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/profile.c b/core/profile.c index 555f623cf..d9dbfed51 100644 --- a/core/profile.c +++ b/core/profile.c @@ -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; -- cgit v1.2.3-70-g09d2