changeset 570:701ead8dddab

Try to reduce legth of log entry string: The metric views of the log data did no longer fit into the line space (because of the change ' to "min"). This may be avoided / reduced by removing spaces depending on the view parameters
author Ideenmodellierer
date Mon, 30 Nov 2020 20:55:23 +0100
parents 3508e6dc4f22
children 91a8f9893e68
files Discovery/Src/tInfoLog.c
diffstat 1 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/tInfoLog.c	Mon Nov 30 20:52:49 2020 +0100
+++ b/Discovery/Src/tInfoLog.c	Mon Nov 30 20:55:23 2020 +0100
@@ -368,7 +368,21 @@
             switch(logbookHeader.decoModel)
             {
             case 1:
-                textPointer += snprintf(&text[textPointer],20,"\016\016 GF  \017");
+            	if(!settingsGetPointer()->nonMetricalSystem)	/* safe space to avoid cursor overlap */
+            	{
+            		if(settingsGetPointer()->amPMTime)
+            		{
+            			textPointer += snprintf(&text[textPointer],20,"\016\016 GF \017");
+            		}
+            		else
+            		{
+            			textPointer += snprintf(&text[textPointer],20,"\016\016GF \017");
+            		}
+            	}
+            	else
+            	{
+            		textPointer += snprintf(&text[textPointer],20,"\016\016 GF  \017");
+            	}
                 break;
             case 2:
                 textPointer += snprintf(&text[textPointer],20,"\016\016 VPM \017");
@@ -386,7 +400,7 @@
             }
             else
             {
-                textPointer += snprintf(&text[textPointer], 20,"%3d.%d\016\016m\017 ", maxDepthMeter,maxDepthSubmeter);
+            	textPointer += snprintf(&text[textPointer], 20,"%3d.%d\016\016m \017", maxDepthMeter,maxDepthSubmeter);
             }
             textPointer += snprintf(&text[textPointer], 20,"%3d\016\016min\017\n\r", divetime);