aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Tim Segers <tsegers@pm.me>2022-10-19 18:32:32 +0200
committerGravatar Tim Segers <tsegers@pm.me>2022-10-19 18:32:32 +0200
commitc52fc3d05530e9eb4eb27aa5e75a7468f6287bb3 (patch)
tree6f59e26fe62e047ee9535aaa39b0c123241f28fb
parent16d1b52543f73d972d33feaa94316dbb67ab907d (diff)
downloadopendeco-c52fc3d05530e9eb4eb27aa5e75a7468f6287bb3.tar.gz
Prevent 0 minute first stopv0.4
-rw-r--r--src/schedule.c4
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 */