diff options
author | Tim Segers <tsegers@pm.me> | 2022-10-19 18:32:32 +0200 |
---|---|---|
committer | Tim Segers <tsegers@pm.me> | 2022-10-19 18:32:32 +0200 |
commit | c52fc3d05530e9eb4eb27aa5e75a7468f6287bb3 (patch) | |
tree | 6f59e26fe62e047ee9535aaa39b0c123241f28fb /src | |
parent | 16d1b52543f73d972d33feaa94316dbb67ab907d (diff) | |
download | opendeco-0.4.tar.gz |
Prevent 0 minute first stopv0.4
Diffstat (limited to 'src')
-rw-r--r-- | src/schedule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/schedule.c b/src/schedule.c index 00a2b13..5630ffb 100644 --- a/src/schedule.c +++ b/src/schedule.c @@ -195,6 +195,10 @@ decoinfo_t calc_deco(decostate_t *ds, const double start_depth, const gas_t *sta * get_gf, the result was inaccurate and needs to be recalculated */ current_gf = get_gf(ds, next_stop); + + /* if the new gf also allows us to ascend further, continue ascending */ + if (ceiling(ds, current_gf) < next_stop) + continue; } /* emit waypoint */ |