mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
The planner should not always ascent from the depth of
the last manually entered waypoint but consider the possibility that it should first top where we are before the next stop depth has cleared. Reported-by: David Carron Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
3e1ade5206
commit
09bbd846da
3 changed files with 3 additions and 2 deletions
|
@ -757,7 +757,7 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i
|
|||
|
||||
/* Find the first potential decostopdepth above current depth */
|
||||
for (stopidx = 0; stopidx < decostoplevelcount; stopidx++)
|
||||
if (*(decostoplevels + stopidx) >= depth)
|
||||
if (decostoplevels[stopidx] > depth)
|
||||
break;
|
||||
if (stopidx > 0)
|
||||
stopidx--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue