mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Store a table of deco stops in planner
... in addition to struct diveplan which combines all kinds of information Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
456e2cec89
commit
e6545a7b0f
4 changed files with 40 additions and 19 deletions
|
@ -842,7 +842,8 @@ void DivePlannerPointsModel::createTemporaryPlan()
|
|||
dump_plan(&diveplan);
|
||||
#endif
|
||||
if (recalcQ() && !diveplan_empty(&diveplan)) {
|
||||
plan(&diveplan, &displayed_dive, DECOTIMESTEP, &cache, isPlanner(), false);
|
||||
struct decostop stoptable[60];
|
||||
plan(&diveplan, &displayed_dive, DECOTIMESTEP, stoptable, &cache, isPlanner(), false);
|
||||
emit calculatedPlanNotes();
|
||||
}
|
||||
// throw away the cache
|
||||
|
@ -878,7 +879,8 @@ void DivePlannerPointsModel::createPlan(bool replanCopy)
|
|||
setRecalc(oldRecalc);
|
||||
|
||||
//TODO: C-based function here?
|
||||
plan(&diveplan, &displayed_dive, DECOTIMESTEP, &cache, isPlanner(), true);
|
||||
struct decostop stoptable[60];
|
||||
plan(&diveplan, &displayed_dive, DECOTIMESTEP, stoptable, &cache, isPlanner(), true);
|
||||
free(cache);
|
||||
if (!current_dive || displayed_dive.id != current_dive->id) {
|
||||
// we were planning a new dive, not re-planning an existing on
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue