Run variations calculation in background

but there are still side effects and thus it crashes.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2017-08-29 11:41:30 +02:00
parent be6b50fce4
commit a9ceecc2e3
6 changed files with 35 additions and 1 deletions

View file

@ -685,6 +685,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
int decostopcounter = 0;
set_gf(diveplan->gflow, diveplan->gfhigh);
lock_planner();
set_vpmb_conservatism(diveplan->vpmb_conservatism);
if (!diveplan->surface_pressure)
diveplan->surface_pressure = SURFACE_PRESSURE;
@ -1082,6 +1083,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
free(stoplevels);
free(gaschanges);
free(bottom_cache);
unlock_planner();
return decodive;
}