diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2017-11-03 07:40:07 +1100 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2017-11-08 15:22:32 +0100 |
commit | b3b787db9430ca6d974a167d23b2ffa1ad3d2b2a (patch) | |
tree | bc0ff805ba4c50e3e8fac88ccf84ac1a85fd08c6 | |
parent | fe474ac266d952206f74b428e4d31e1f8531180d (diff) | |
download | subsurface-b3b787db9430ca6d974a167d23b2ffa1ad3d2b2a.tar.gz |
VPMB: final_tts may be calculated before final sample
We calculate tts every 30s, not every sample. Consider that when determining
the time that the ceiling would have cleared if it's after the surfacing time.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
-rw-r--r-- | core/profile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/profile.c b/core/profile.c index 32e2103af..d7f110db3 100644 --- a/core/profile.c +++ b/core/profile.c @@ -1080,7 +1080,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru prev_deco_time = deco_state->deco_time; // Do we need to update deco_time? if (final_tts > 0) - deco_state->deco_time = pi->maxtime + final_tts - time_deep_ceiling; + deco_state->deco_time = last_ndl_tts_calc_time + final_tts - time_deep_ceiling; else if (time_clear_ceiling > 0) /* Consistent with planner, deco_time ends after ascending (20s @9m/min from 3m) * at end of whole minute after clearing ceiling. The deepest ceiling when planning a dive |