summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-12-10 07:50:19 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-10 08:00:52 +0100
commit0d4fb44c189cd91e937aff5e2e7a30691249a832 (patch)
treea02a977d72034324024e5576137e74c3bf437a4e
parent13c9d2ad38da23ba39a56c5bd2b0c48e23b9f38a (diff)
downloadsubsurface-0d4fb44c189cd91e937aff5e2e7a30691249a832.tar.gz
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 <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--planner.c10
1 files 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);