summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2018-05-08 16:08:07 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-05-14 23:47:00 +0300
commitd018ceb8523dfa78da4bf508b9f7f829cd423e02 (patch)
treeedda04db6da8124214e1fbd04f826894f2e112a2 /core
parent09da42f8192a83dba0b7b31b78b5c40100e164b1 (diff)
downloadsubsurface-d018ceb8523dfa78da4bf508b9f7f829cd423e02.tar.gz
Planner: Honor last manual divemode
Start the decompression schedule in the divemode of the last manual section. Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core')
-rw-r--r--core/planner.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/planner.c b/core/planner.c
index 40424cc61..d3a41121d 100644
--- a/core/planner.c
+++ b/core/planner.c
@@ -735,7 +735,9 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i
current_cylinder = get_cylinderid_at_time(dive, &dive->dc, sample->time);
// FIXME: This needs a function to find the divemode at the end of the dive like in
- // divemode = get_current_divemode(&dive->dc, 1e5, &ev, &divemode);
+ struct event *ev = NULL;
+ divemode = UNDEF_COMP_TYPE;
+ divemode = get_current_divemode(&dive->dc, bottom_time, &ev, &divemode);
gas = dive->cylinder[current_cylinder].gasmix;
po2 = sample->setpoint.mbar;