From f9d05a803875e947cebc7596d9ba078302c3f75f Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Sun, 8 Oct 2017 19:29:48 +1100 Subject: VPM-B profile: calculate parameters when in planner mode Calculating parameters when in the planner mode is necessary to display the correct ceiling. Fixes #601 Signed-off-by: Rick Walsh --- core/profile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/profile.c') diff --git a/core/profile.c b/core/profile.c index b3bf7cff5..53eff57e6 100644 --- a/core/profile.c +++ b/core/profile.c @@ -998,7 +998,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru entry->ceiling = (entry - 1)->ceiling; } else { /* Keep updating the VPM-B gradients until the start of the ascent phase of the dive. */ - if (decoMode() == VPMB && !in_planner() && last_ceiling >= first_ceiling && first_iteration == true) { + if (decoMode() == VPMB && last_ceiling >= first_ceiling && first_iteration == true) { nuclear_regeneration(t1); vpmb_start_gradient(); /* For CVA calculations, start by guessing deco time = dive time remaining */ @@ -1012,7 +1012,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru current_ceiling = entry->ceiling; last_ceiling = current_ceiling; /* If using VPM-B outside the planner, take first_ceiling_pressure as the deepest ceiling */ - if (decoMode() == VPMB && !in_planner()) { + if (decoMode() == VPMB) { if (current_ceiling > first_ceiling) { time_deep_ceiling = t1; first_ceiling = current_ceiling; -- cgit v1.2.3-70-g09d2