From f66ea4cbb03c126fce3805d778c9f197fb6fa5e8 Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Tue, 16 Jun 2015 21:15:46 +1000 Subject: Show duration before runtime on planner notes table Switch the column order of the planner notes table so that duration is displayed before runtime. This is consistent with: - the verbatim output order, e.g. "Stay at 12.0 m for 3:00 min - runtime 32:48 on EAN50" - MultiDeco, e.g. http://www.hhssoftware.com/multideco/view_multideco.html - Planner on the Shearwater Petrel - How I have been taught to write out my dive plan in my wetnotes Signed-off-by: Rick Walsh Signed-off-by: Dirk Hohndel --- planner.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/planner.c b/planner.c index c8578c320..9b2d355fa 100644 --- a/planner.c +++ b/planner.c @@ -552,12 +552,12 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool if (!plan_verbatim) { len += snprintf(buffer + len, sizeof(buffer) - len, "
", translate("gettextFromC", "depth")); - if (plan_display_runtime) - len += snprintf(buffer + len, sizeof(buffer) - len, "", - translate("gettextFromC", "runtime")); if (plan_display_duration) len += snprintf(buffer + len, sizeof(buffer) - len, "", translate("gettextFromC", "duration")); + if (plan_display_runtime) + len += snprintf(buffer + len, sizeof(buffer) - len, "", + translate("gettextFromC", "runtime")); len += snprintf(buffer + len, sizeof(buffer) - len, "", translate("gettextFromC", "gas")); @@ -640,14 +640,14 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool if ((dp->depth == lastdepth && dp->depth != nextdp->depth) || plan_display_transitions || dp->entered || !dp->next || (gaschange && dp->next && dp->depth != nextdp->depth)) { snprintf(temp, sizeof(temp), translate("gettextFromC", "%3.0f%s"), depthvalue, depth_unit); len += snprintf(buffer + len, sizeof(buffer) - len, "", temp); - if (plan_display_runtime) { - snprintf(temp, sizeof(temp), translate("gettextFromC", "%3dmin"), (dp->time + 30) / 60); - len += snprintf(buffer + len, sizeof(buffer) - len, "", temp); - } if (plan_display_duration) { snprintf(temp, sizeof(temp), translate("gettextFromC", "%3dmin"), (dp->time - lasttime + 30) / 60); len += snprintf(buffer + len, sizeof(buffer) - len, "", temp); } + if (plan_display_runtime) { + snprintf(temp, sizeof(temp), translate("gettextFromC", "%3dmin"), (dp->time + 30) / 60); + len += snprintf(buffer + len, sizeof(buffer) - len, "", temp); + } if (gaschange) { if(dp->depth == lastdepth && !postponed) { -- cgit v1.2.3-70-g09d2
%s%s%s%s%s
%s%s%s%s