Segment duration in planner

Anton Lundin glance at acc.umu.se
Mon Jul 21 02:04:41 PDT 2014


Hi.

I have bin playing around with the planner a bit to try to vet it and to
verify the numbers. As far as the numbers goes everything looks ok.

Two small things.

In the dive planner points model, the trash-can icon is now removed if
there is only one row in there, which is good because we don't allow it
to be removed, but i would rather say that it should be replaced with a
crossed out trash-can icon or something.
And if we do this kinds of things in the dive planner points model, we
should do it in the cylinder model to, because we don't allow the last
cylinder to be removed.


The second one is more of a philosophical question. When i plan
decompression diving we plan the dive ahead and memorizes and write down
the stop ladder, and they usually go like: 1, 1, 1, 3, 5, 15 or 1, 1, 2,
4, 12. Thats the stop length without the transitions in-between.

Currently in the planner when you click the "Display segment duration"
the segments shown includes the transition time to that stop plus the
stop time.

Attached patch changes that to only include the stop length.

I would like to see that functionality in the planner, and if we are
going to change the semantic meaning of that column we should do it
before the release. Otherwise i would cook up a patch that introduces
enough checkboxes to produce this behavior.

Which part sounds like a desirable behavior? Other ideas from the other
folks that do decompression planning?


//Anton


-- 
Anton Lundin	+46702-161604
-------------- next part --------------
>From ca36967afb4c359f69f4169988c4f6372b77f436 Mon Sep 17 00:00:00 2001
From: Anton Lundin <glance at acc.umu.se>
Date: Mon, 21 Jul 2014 10:59:26 +0200
Subject: [PATCH] Only include deco time in stop duration

This removes the transition part from the duration column, so the
duration column only contains the stop length.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 planner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/planner.c b/planner.c
index 3cad8d1..d03f8e1 100644
--- a/planner.c
+++ b/planner.c
@@ -621,8 +621,8 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
 					len += snprintf(buffer + len, sizeof(buffer) - len, "<td> </td>");
 				}
 				len += snprintf(buffer + len, sizeof(buffer) - len, "</tr>");
-				lasttime = dp->time;
 			}
+			lasttime = dp->time;
 		}
 		if (gaschange) {
 			// gas switch at this waypoint
-- 
1.9.1



More information about the subsurface mailing list