diff Discovery/Src/tMenuHardware.c @ 1005:85f7e19c6688 GasConsumption

Switch menu position of Buzzer and flipdisplay option: The Buzzer is an HW option while the flipdisplay is a SW function => exchange the position in order to clean up categories.
author Ideenmodellierer
date Sat, 03 May 2025 17:47:53 +0200
parents ac25c35a3c97
children f8e2895c91e5
line wrap: on
line diff
--- a/Discovery/Src/tMenuHardware.c	Sat May 03 17:45:32 2025 +0200
+++ b/Discovery/Src/tMenuHardware.c	Sat May 03 17:47:53 2025 +0200
@@ -29,6 +29,7 @@
 /* Includes ------------------------------------------------------------------*/
 #include "tMenu.h"
 #include "tMenuHardware.h"
+#include "ostc.h"
 
 //#define NEXTLINE(text, textPointer) 	{text[(textPointer)++] = '\n'; text[textPointer++] = '\r'; text[textPointer] = 0;}
 //	NEXTLINE(text,textPointer);
@@ -140,18 +141,19 @@
     }
     nextline(text,&textPointer);
 
-    if((line == 0) || (line == 5))
+    if((isNewDisplay()) && ((line == 0) || (line == 5)))
     {
-            text[textPointer++] = TXT_2BYTE;
-            text[textPointer++] = TXT2BYTE_FLIPDISPLAY;
-            text[textPointer++] = '\t';
-            if(settingsGetPointer()->FlipDisplay)
-                text[textPointer++] = '\005';
-            else
-                text[textPointer++] = '\006';
-            text[textPointer] = 0;
-            nextline(text,&textPointer);
+		text[textPointer++] = TXT_2BYTE;
+		text[textPointer++] = TXT2BYTE_BUZZER;
+		text[textPointer++] = ' ';
+		text[textPointer++] = TXT_Warning;
+		text[textPointer++] = '\t';
+	    if(settingsGetPointer()->warningBuzzer)
+	            text[textPointer++] = '\005';
+	        else
+	            text[textPointer++] = '\006';
     }
+    nextline(text,&textPointer);
 
     return StMHARD;
 }