From 0d4fb44c189cd91e937aff5e2e7a30691249a832 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Tue, 10 Dec 2013 07:50:19 +0100 Subject: Remove some safety stop code in plan() Some code in plan() left from the gtk days introduced a safety stop in the plan. It created a un-editable diveplanpoint. Fixes #349 Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- planner.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/planner.c b/planner.c index 3bec66fe5..08e7f9716 100644 --- a/planner.c +++ b/planner.c @@ -614,15 +614,9 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, b po2 = dive->dc.sample[dive->dc.samples - 1].po2; depth = dive->dc.sample[dive->dc.samples - 1].depth.mm; - /* if all we wanted was the dive just get us back to the surface - * we ascend with 15ft / min to the safety stop and 7.5ft / min from there */ + /* if all we wanted was the dive just get us back to the surface */ if (!add_deco) { - if (depth > 5000) { - transitiontime = depth / 75; /* this still needs to be made configurable */ - plan_add_segment(diveplan, transitiontime, 5000, o2, he, po2); - depth = 5000; - } - transitiontime = 2 * depth / 75; /* this still needs to be made configurable */ + transitiontime = depth / 75; /* this still needs to be made configurable */ plan_add_segment(diveplan, transitiontime, 0, o2, he, po2); /* re-create the dive */ delete_single_dive(dive_table.nr - 1); -- cgit v1.2.3-70-g09d2