mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +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
|
@ -1,5 +1,6 @@
|
|||
export: show progress dialog when exporting to TeX
|
||||
printing: use sensible font size even for strange window size
|
||||
* Planner: Don't immediately ascent automatically
|
||||
|
||||
---
|
||||
* Always add new entries at the very top of this file above other existing entries and this note.
|
||||
|
|
|
@ -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--;
|
||||
|
|
|
@ -472,7 +472,7 @@ void TestPlan::testImperial()
|
|||
struct divedatapoint *dp = testPlan.dp;
|
||||
while (!dp->minimum_gas.mbar && dp->next)
|
||||
dp = dp->next;
|
||||
QCOMPARE(lrint(dp->minimum_gas.mbar / 1000.0), 154l);
|
||||
QCOMPARE(lrint(dp->minimum_gas.mbar / 1000.0), 155l);
|
||||
// check first gas change to EAN36 at 33m
|
||||
struct event *ev = displayed_dive.dc.events;
|
||||
QVERIFY(ev != NULL);
|
||||
|
|
Loading…
Reference in a new issue