From c52fc3d05530e9eb4eb27aa5e75a7468f6287bb3 Mon Sep 17 00:00:00 2001 From: Tim Segers Date: Wed, 19 Oct 2022 18:32:32 +0200 Subject: Prevent 0 minute first stop --- src/schedule.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 */ -- cgit v1.2.3-70-g09d2