From 2ffeff9a2c6fd130bc9925ae37c2debf2eedb29f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 8 Jan 2013 13:59:48 -0800 Subject: Do planned deco stops in multiples of 1 minute We may want to make this configurable, but I haven't seen any software that doesn't do deco stops in full minutes. Signed-off-by: Dirk Hohndel --- planner.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/planner.c b/planner.c index 16f09010b..04d37363d 100644 --- a/planner.c +++ b/planner.c @@ -331,6 +331,9 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep) } while (stopidx > 0) { /* this indicates that we had a non-zero first ceiling */ wait_time = time_at_last_depth(dive, stoplevels[stopidx - 1], cached_datap); + /* typically deco plans are done in one minute increments; we may want to + * make this configurable at some point */ + wait_time = ((wait_time + 59) / 60) * 60; #if DEBUG_PLAN & 2 printf("waittime %d:%02d at depth %5.2lfm\n", FRACTION(wait_time, 60), stoplevels[stopidx] / 1000.0); #endif -- cgit v1.2.3-70-g09d2