Hi,

On 13 Oct 2015, at 10:27, Anton Lundin <[email protected]> wrote:

For the TTS I think its really important to be clear that its somewhere
above that number. For the ndl calculations it really didn't matter that
it was capped at 120min, because a NDL of 120 min means just "LOTS", but
a TTS you really need to be clear that its bigger than X.


But when clearing up that TTS is > 120 we should do the same for NDL.


here is a patch that does just that.

Price: Two new strings.

Best
Robert

From 4847d1a16483ac4208ca86f5157abebb4d67a164 Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" <[email protected]>
Date: Tue, 13 Oct 2015 11:21:14 +0200
Subject: [PATCH] Say in infobox if NDL or TTS calculation was cut-off

Signed-off-by: Robert C. Helling <[email protected]>
---
 profile.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/profile.c b/profile.c
index ef54718..82719bb 100644
--- a/profile.c
+++ b/profile.c
@@ -1206,10 +1206,17 @@ static void plot_string(struct plot_info *pi, struct 
plot_data *entry, struct me
                 * everything will be ok. */
                put_string(b, translate("gettextFromC", "In deco (calc)\n"));
        } else if (prefs.calcndltts && entry->ndl_calc != 0) {
-               put_format(b, translate("gettextFromC", "NDL: %umin (calc)\n"), 
DIV_UP(entry->ndl_calc, 60));
+               if(entry->ndl_calc < MAX_PROFILE_DECO)
+                       put_format(b, translate("gettextFromC", "NDL: %umin 
(calc)\n"), DIV_UP(entry->ndl_calc, 60));
+               else
+                       put_format(b, translate("gettextFromC", "NDL: >2h 
(calc)\n"));
+       }
+       if (entry->tts_calc) {
+               if (entry->tts_calc < MAX_PROFILE_DECO)
+                       put_format(b, translate("gettextFromC", "TTS: %umin 
(calc)\n"), DIV_UP(entry->tts_calc, 60));
+               else
+                       put_format(b, translate("gettextFromC", "TTS: >2h 
(calc)\n"));
        }
-       if (entry->tts_calc)
-               put_format(b, translate("gettextFromC", "TTS: %umin (calc)\n"), 
DIV_UP(entry->tts_calc, 60));
        if (entry->rbt)
                put_format(b, translate("gettextFromC", "RBT: %umin\n"), 
DIV_UP(entry->rbt, 60));
        if (entry->ceiling) {
-- 
1.9.5 (Apple Git-50.3)

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to