summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2017-12-29 11:50:20 +1100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-28 19:11:31 -0800
commit34236e3c84acd76ecb26a8abb4e10ccada4636ff (patch)
tree715e369b9d90f35609f938b1d5bb8ccbc3357473
parent57e701f10e834b89864ce879c4fc49714b3e47e8 (diff)
downloadsubsurface-34236e3c84acd76ecb26a8abb4e10ccada4636ff.tar.gz
Planner notes: don't omit deco stops with rapid ascent rates
This fixes a bug where if the user entered very high ascent (or less commonly descent) rates such that the time to ascend (or descend) from one level to the next was less than 10s, that leg would be skipped in the dive plan notes. Reported-by: Alexander Maier <maieralex@me.com> Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
-rw-r--r--core/plannernotes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/plannernotes.c b/core/plannernotes.c
index a2d4efa19..d5fedd4bc 100644
--- a/core/plannernotes.c
+++ b/core/plannernotes.c
@@ -162,7 +162,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
!gaschange_before &&
!gaschange_after)
continue;
- if (dp->time - lasttime < 10 && !(gaschange_after && dp->next && dp->depth.mm != dp->next->depth.mm))
+ if ((dp->time - lasttime < 10 && lastdepth == dp->depth.mm) && !(gaschange_after && dp->next && dp->depth.mm != dp->next->depth.mm))
continue;
/* Store pointer to last entered datapoint for minimum gas calculation */