diff Discovery/Src/tMenuSystem.c @ 1038:677d293c669f GasConsumption

Bugfix AM/PM time: in the previous version the AM/PM time format was not shown in the system menu and the customer Info view. To solve this problem a helper function was added which now returns a string which consideres the time format setting.
author Ideenmodellierer
date Tue, 16 Sep 2025 20:13:43 +0200
parents 2af07aa38531
children
line wrap: on
line diff
--- a/Discovery/Src/tMenuSystem.c	Mon Sep 15 21:12:44 2025 +0200
+++ b/Discovery/Src/tMenuSystem.c	Tue Sep 16 20:13:43 2025 +0200
@@ -58,7 +58,7 @@
     textPointer = 0;
     *tab = 300;
     *subtext = 0;
-    char tmpString[15];
+    char tmpString[20];
 
     resetLineMask(StMSYS);
 
@@ -131,14 +131,10 @@
         text[textPointer++] = TXT_Date;
         getStringOfFormat_DDMMYY(tmpString,15);
         textPointer += snprintf(&text[textPointer], 40,"\016\016 %s ",tmpString);
-       convertStringOfDate_DDMMYY(tmpString,15,Sdate.Date, Sdate.Month, Sdate.Year);
+        convertStringOfDate_DDMMYY(tmpString,15,Sdate.Date, Sdate.Month, Sdate.Year);
         textPointer += snprintf(&text[textPointer], 40,"\017\t%s   ",tmpString);
-
-        textPointer += snprintf(&text[textPointer], 60,
-            "%02d:%02d:%02d"
-            "\n\r"
-            ,Stime.Hours, Stime.Minutes, Stime.Seconds
-        );
+        formatStringOfTime(tmpString,20,Stime,0,1);
+        textPointer += snprintf(&text[textPointer], 60,"%s\n\r",tmpString);
     }
     else
     {