Hand planner variables to profile

Pass the planner state struct to the profile computation so it can use
deco_time and first ceiling to display VPM-B ceiling.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2017-11-24 14:17:01 +01:00
parent 8e21a65653
commit 088db5e12b
6 changed files with 15 additions and 8 deletions

View file

@ -640,7 +640,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
* shown.
*/
plotInfo = calculate_max_limits_new(&displayed_dive, currentdc);
create_plot_info_new(&displayed_dive, currentdc, &plotInfo, !shouldCalculateMaxDepth);
create_plot_info_new(&displayed_dive, currentdc, &plotInfo, !shouldCalculateMaxDepth, &DivePlannerPointsModel::instance()->final_deco_state);
int newMaxtime = get_maxtime(&plotInfo);
if (shouldCalculateMaxTime || newMaxtime > maxtime)
maxtime = newMaxtime;