mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Planner: show mean depth
Almost invisible, mostly looking like an odd bug in the profile code, there was a tiny red line at depth 0 in the planned profile. Turns out that was the missing mean depth. We didn't populate enough data in the dive computer of the dive we generated from the plan (and the length of the depth line was incorrectly determined by the duration of the dive instead of the duration stored in the dive computer). Fixes #570 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
41953c8c46
commit
825eb019ab
4 changed files with 7 additions and 3 deletions
|
@ -924,10 +924,13 @@ void plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
|
|||
}
|
||||
}
|
||||
|
||||
/* We made it to the surface */
|
||||
/* We made it to the surface
|
||||
* Create the final dive, add the plan to the notes and fixup some internal
|
||||
* data that we need to be there when plotting the dive */
|
||||
plan_add_segment(diveplan, clock - previous_point_time, 0, gas, po2, false);
|
||||
create_dive_from_plan(diveplan, is_planner);
|
||||
add_plan_to_notes(diveplan, &displayed_dive, show_disclaimer);
|
||||
fixup_dc_duration(&displayed_dive.dc);
|
||||
|
||||
free(stoplevels);
|
||||
free(gaschanges);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue