summaryrefslogtreecommitdiffstats
path: root/core/plannernotes.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2018-02-20 13:03:11 +0100
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2018-02-20 14:29:31 +0100
commit818ab36b24cc0a116ac81954fb137e0bacc8b82e (patch)
tree3cc7afa4d3f2f155ad5d1b6c8c5c1f9b0dc4e2ed /core/plannernotes.c
parent394054ebc1713de4c5d6ac46dbcf2c20768dfdbb (diff)
downloadsubsurface-818ab36b24cc0a116ac81954fb137e0bacc8b82e.tar.gz
Indicate direction of transition in verbatim plan
Replace "Transition to" by "Ascent to" or "Descend to" Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/plannernotes.c')
-rw-r--r--core/plannernotes.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/plannernotes.c b/core/plannernotes.c
index 1eca69417..7f301d732 100644
--- a/core/plannernotes.c
+++ b/core/plannernotes.c
@@ -223,14 +223,16 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
if (dp->depth.mm != lastprintdepth) {
if (plan_display_transitions || dp->entered || !dp->next || (gaschange_after && dp->next && dp->depth.mm != nextdp->depth.mm)) {
if (dp->setpoint) {
- snprintf(temp, sz_temp, translate("gettextFromC", "Transition to %.*f %s in %d:%02d min - runtime %d:%02u on %s (SP = %.1fbar)"),
+ snprintf(temp, sz_temp, translate("gettextFromC", "%s to %.*f %s in %d:%02d min - runtime %d:%02u on %s (SP = %.1fbar)"),
+ dp->depth.mm < lastprintdepth ? translate("gettextFromC", "Ascend") : translate("gettextFromC", "Descend"),
decimals, depthvalue, depth_unit,
FRACTION(dp->time - lasttime, 60),
FRACTION(dp->time, 60),
gasname(&gasmix),
(double) dp->setpoint / 1000.0);
} else {
- snprintf(temp, sz_temp, translate("gettextFromC", "Transition to %.*f %s in %d:%02d min - runtime %d:%02u on %s"),
+ snprintf(temp, sz_temp, translate("gettextFromC", "%s to %.*f %s in %d:%02d min - runtime %d:%02u on %s"),
+ dp->depth.mm < lastprintdepth ? translate("gettextFromC", "Ascend") : translate("gettextFromC", "Descend"),
decimals, depthvalue, depth_unit,
FRACTION(dp->time - lasttime, 60),
FRACTION(dp->time, 60),