summaryrefslogtreecommitdiffstats
path: root/core/planner.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/planner.c')
-rw-r--r--core/planner.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/planner.c b/core/planner.c
index 18f3c8701..c0b07680d 100644
--- a/core/planner.c
+++ b/core/planner.c
@@ -34,6 +34,7 @@ int decostoplevels_imperial[] = { 0, 3048, 6096, 9144, 12192, 15240, 18288, 2133
325120, 345440, 365760, 386080 };
double plangflow, plangfhigh;
+int bottom_time = 0;
extern double regressiona();
extern double regressionb();
@@ -669,7 +670,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
bool stopping = false;
bool pendinggaschange = false;
int clock, previous_point_time;
- int avg_depth, max_depth, bottom_time = 0;
+ int avg_depth, max_depth;
int last_ascend_rate;
int best_first_ascend_cylinder;
struct gasmix gas, bottom_gas;
@@ -1066,6 +1067,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
diveplan->eff_gflow = lrint(100.0 * (regressiona() * first_stop_depth + regressionb()));
}
+
create_dive_from_plan(diveplan, dive, is_planner);
add_plan_to_notes(diveplan, dive, show_disclaimer, error);
fixup_dc_duration(&dive->dc);