VPM-B profile: initialize first_ceiling_pressure

If we don't set first_ceiling_pressure at start of dive, a shallow ceiling can
be shown when it shouldn't be.

Fixes #584

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Rick Walsh 2017-09-24 17:29:56 +10:00 committed by Lubomir I. Ivanov
parent 1f50485732
commit 8b5c5674b1

View file

@ -966,6 +966,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
* Set maximum number of iterations to 10 just in case */
while ((abs(prev_deco_time - deco_time) >= 30) && (count_iteration < 10)) {
int last_ndl_tts_calc_time = 0, first_ceiling = 0, current_ceiling, final_tts = 0 , time_clear_ceiling = 0, time_deep_ceiling = 0;
deco_state->first_ceiling_pressure.mbar = depth_to_mbar(first_ceiling, dive);
struct gasmix *gasmix = NULL;
struct event *ev = NULL;