diff options
-rw-r--r-- | core/planner.c | 8 | ||||
-rw-r--r-- | core/plannernotes.c | 2 | ||||
-rw-r--r-- | desktop-widgets/plannerSettings.ui | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/core/planner.c b/core/planner.c index b7bc56eab..fd4ed2c36 100644 --- a/core/planner.c +++ b/core/planner.c @@ -932,10 +932,6 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i if (gi >= 0 && stoplevels[stopidx] <= gaschanges[gi].depth) { /* We have reached a gas change. * Record this in the dive plan */ - if (is_final_plan) - plan_add_segment(diveplan, clock - previous_point_time, depth, current_cylinder, po2, false, divemode); - previous_point_time = clock; - stopping = true; /* Check we need to change cylinder. * We might not if the cylinder was chosen by the user @@ -946,6 +942,10 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i if (!prefs.switch_at_req_stop || !trial_ascent(ds, 0, depth, stoplevels[stopidx - 1], avg_depth, bottom_time, dive->cylinder[current_cylinder].gasmix, po2, diveplan->surface_pressure / 1000.0, dive, divemode) || get_o2(dive->cylinder[current_cylinder].gasmix) < 160) { + if (is_final_plan) + plan_add_segment(diveplan, clock - previous_point_time, depth, current_cylinder, po2, false, divemode); + stopping = true; + previous_point_time = clock; current_cylinder = gaschanges[gi].gasidx; gas = dive->cylinder[current_cylinder].gasmix; #if DEBUG_PLAN & 16 diff --git a/core/plannernotes.c b/core/plannernotes.c index 8d1f04731..3ce2b6c65 100644 --- a/core/plannernotes.c +++ b/core/plannernotes.c @@ -292,7 +292,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d (!isascent && (gaschange_before || rebreatherchange_before) && nextdp && dp->depth.mm != nextdp->depth.mm) || ((gaschange_after || rebreatherchange_after) && lastentered) || ((gaschange_after || rebreatherchange_after)&& !isascent) || (isascent && (gaschange_after || rebreatherchange_after) && nextdp && dp->depth.mm != nextdp->depth.mm ) || - (lastentered && !dp->entered)) { + (lastentered && !dp->entered && dp->next->depth.mm == dp->depth.mm)) { // Print a symbol to indicate whether segment is an ascent, descent, constant depth (user entered) or deco stop if (isascent) segmentsymbol = "➚"; // up-right arrow for ascent diff --git a/desktop-widgets/plannerSettings.ui b/desktop-widgets/plannerSettings.ui index 6335b9b1c..f22d0db45 100644 --- a/desktop-widgets/plannerSettings.ui +++ b/desktop-widgets/plannerSettings.ui @@ -336,7 +336,7 @@ <string/> </property> <property name="minimum"> - <number>0</number> + <number>1</number> </property> <property name="maximum"> <number>9</number> |