summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/planner.c b/planner.c
index 0aa34acdc..d6efb61f1 100644
--- a/planner.c
+++ b/planner.c
@@ -33,6 +33,14 @@ int decostoplevels_imperial[] = { 0, 3048, 6096, 9144, 12192, 15240, 18288, 2133
double plangflow, plangfhigh;
bool plan_verbatim, plan_display_runtime, plan_display_duration, plan_display_transitions;
+/* This is a bit round about: Currently, we only support VPM-B in the planner,
+ * so, when we compute ceilings we have to know if we are in planning mode since
+ * the maximally allowed gradient in the tissues is determined by the critical volume algorithm for
+ * which we currently have no version for logged dives. But the information about the application state
+ * is only available in the C++/Qt part. So this global variable is a way to leak this info. */
+
+bool in_planner = false;
+
const char *disclaimer;
#if DEBUG_PLAN
@@ -879,7 +887,7 @@ bool trial_ascent(int trial_depth, int stoplevel, int avg_depth, int bottom_time
tissue_tolerance = add_segment(depth_to_mbar(trial_depth, &displayed_dive) / 1000.0,
gasmix,
TIMESTEP, po2, &displayed_dive, prefs.decosac);
- if (prefs.deco_mode != VPMB && deco_allowed_depth(tissue_tolerance, surface_pressure, &displayed_dive, 1) > trial_depth - deltad) {
+ if (deco_allowed_depth(tissue_tolerance, surface_pressure, &displayed_dive, 1) > trial_depth - deltad) {
/* We should have stopped */
clear_to_ascend = false;
break;