diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-08 13:59:48 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-08 13:59:48 -0800 |
commit | 2ffeff9a2c6fd130bc9925ae37c2debf2eedb29f (patch) | |
tree | 9fdee813c4069250a2e20bda29735bb04cc84d85 /planner.c | |
parent | 1bec821c731780a9a0b8292691f5e375128a6640 (diff) | |
download | subsurface-2ffeff9a2c6fd130bc9925ae37c2debf2eedb29f.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r-- | planner.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |