summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-19 21:52:08 +1200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-19 21:52:08 +1200
commit86c961614bfa8ab9057319ea5f22816351a7f61a (patch)
treedbec4a7d0bba3c6554a7a86ff45ce3fb840253c8 /profile.c
parentd6499cc32a0a7486aee3156bfa98542bc33618c1 (diff)
downloadsubsurface-86c961614bfa8ab9057319ea5f22816351a7f61a.tar.gz
Actually walk all dive computers, don't just claim to do so
If the first dive computer had pressure samples, but the second one (and no higher one) did, then we would draw a flat horizontal line for the tank pressure graph (but lable it with the correct pressures). This routine that is hunting for the actual maxima and minima does have to really go through all dive computers, not just "this one and up". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/profile.c b/profile.c
index 05e84cd73..8246a961b 100644
--- a/profile.c
+++ b/profile.c
@@ -442,8 +442,9 @@ static void check_setpoint_events(struct dive *dive, struct divecomputer *dc, st
}
-struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer *dc)
+struct plot_info calculate_max_limits_new(struct dive *dive)
{
+ struct divecomputer *dc = &dive->dc;
static struct plot_info pi;
int maxdepth = dive->maxdepth.mm;
int maxtime = 0;