diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2017-09-24 17:29:56 +1000 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-10-01 23:58:55 +0300 |
commit | 8b5c5674b1aa7638ef0de2fd73f7780fd9121e86 (patch) | |
tree | 92ee0843b601bdeb9c187dc640ff7b1fc0223c32 /core/profile.c | |
parent | 1f50485732f5a84dc1e41014f760f55852da188a (diff) | |
download | subsurface-8b5c5674b1aa7638ef0de2fd73f7780fd9121e86.tar.gz |
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>
Diffstat (limited to 'core/profile.c')
-rw-r--r-- | core/profile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/profile.c b/core/profile.c index 813e69fc2..07b0a96a2 100644 --- a/core/profile.c +++ b/core/profile.c @@ -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; |