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 <[email protected]> --- core/profile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/profile.c b/core/profile.c index 4ff27fcd..846fa7f2 100644 --- a/core/profile.c +++ b/core/profile.c @@ -967,6 +967,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; + first_ceiling_pressure.mbar = depth_to_mbar(first_ceiling, dive); struct gasmix *gasmix = NULL; struct event *ev = NULL; -- 2.13.5 _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
