comparison 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
comparison
equal deleted inserted replaced
1037:2af07aa38531 1038:677d293c669f
56 56
57 data = settingsGetPointer(); 57 data = settingsGetPointer();
58 textPointer = 0; 58 textPointer = 0;
59 *tab = 300; 59 *tab = 300;
60 *subtext = 0; 60 *subtext = 0;
61 char tmpString[15]; 61 char tmpString[20];
62 62
63 resetLineMask(StMSYS); 63 resetLineMask(StMSYS);
64 64
65 // dive mode 65 // dive mode
66 if(actual_menu_content != MENU_SURFACE) 66 if(actual_menu_content != MENU_SURFACE)
129 translateTime(pStateReal->lifeData.timeBinaryFormat, &Stime); 129 translateTime(pStateReal->lifeData.timeBinaryFormat, &Stime);
130 130
131 text[textPointer++] = TXT_Date; 131 text[textPointer++] = TXT_Date;
132 getStringOfFormat_DDMMYY(tmpString,15); 132 getStringOfFormat_DDMMYY(tmpString,15);
133 textPointer += snprintf(&text[textPointer], 40,"\016\016 %s ",tmpString); 133 textPointer += snprintf(&text[textPointer], 40,"\016\016 %s ",tmpString);
134 convertStringOfDate_DDMMYY(tmpString,15,Sdate.Date, Sdate.Month, Sdate.Year); 134 convertStringOfDate_DDMMYY(tmpString,15,Sdate.Date, Sdate.Month, Sdate.Year);
135 textPointer += snprintf(&text[textPointer], 40,"\017\t%s ",tmpString); 135 textPointer += snprintf(&text[textPointer], 40,"\017\t%s ",tmpString);
136 136 formatStringOfTime(tmpString,20,Stime,0,1);
137 textPointer += snprintf(&text[textPointer], 60, 137 textPointer += snprintf(&text[textPointer], 60,"%s\n\r",tmpString);
138 "%02d:%02d:%02d"
139 "\n\r"
140 ,Stime.Hours, Stime.Minutes, Stime.Seconds
141 );
142 } 138 }
143 else 139 else
144 { 140 {
145 strcpy(&text[textPointer],"\n\r"); 141 strcpy(&text[textPointer],"\n\r");
146 textPointer += 2; 142 textPointer += 2;