mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Actually compute variations in background
This reenables the computation of plan variations but now in a separate thread. Once finieshed, a signal is sent to update the notes. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
f159792b80
commit
a9703628c4
6 changed files with 73 additions and 44 deletions
|
@ -688,7 +688,6 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i
|
|||
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;
|
||||
|
@ -733,7 +732,6 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i
|
|||
transitiontime = depth / 75; /* this still needs to be made configurable */
|
||||
plan_add_segment(diveplan, transitiontime, 0, current_cylinder, po2, false);
|
||||
create_dive_from_plan(diveplan, dive, is_planner);
|
||||
unlock_planner();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -820,7 +818,6 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i
|
|||
|
||||
free(stoplevels);
|
||||
free(gaschanges);
|
||||
unlock_planner();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1084,7 +1081,6 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i
|
|||
free(stoplevels);
|
||||
free(gaschanges);
|
||||
free(bottom_cache);
|
||||
unlock_planner();
|
||||
return decodive;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue