diff Discovery/Src/tMenuHardware.c @ 110:cc8e24374b83 FlipDisplay

Added option to handled mirrored display to existing functions
author Ideenmodellierer
date Tue, 01 Jan 2019 21:02:17 +0100
parents 5f11787b4f42
children cc9c18075e00
line wrap: on
line diff
--- a/Discovery/Src/tMenuHardware.c	Tue Jan 01 21:00:55 2019 +0100
+++ b/Discovery/Src/tMenuHardware.c	Tue Jan 01 21:02:17 2019 +0100
@@ -162,16 +162,32 @@
     }
     nextline(text,&textPointer);
 
-    if((getLicence() == LICENCEBONEX) &&((line == 0) || (line == 6)))
+    if((line == 0) || (line == 6))
     {
-        text[textPointer++] = TXT_2BYTE;
-        text[textPointer++] = TXT2BYTE_ScooterSetup;
-        text[textPointer++] = '\t';
+    	if(getLicence() == LICENCEBONEX)
+    	{
+			text[textPointer++] = TXT_2BYTE;
+			text[textPointer++] = TXT2BYTE_ScooterSetup;
+			text[textPointer++] = '\t';
 
-//		textPointer += snprintf(&text[textPointer],25,"D%i  L%i  ",settingsGetPointer()->scooterDrag, settingsGetPointer()->scooterLoad);
-        textPointer += snprintf(&text[textPointer],25,"D%i  L%i  %i\016\016 Wh\017",settingsGetPointer()->scooterDrag, settingsGetPointer()->scooterLoad, settingsGetPointer()->scooterBattSize);
-//		textPointer += bo4GetBatteryName(&text[textPointer], settingsGetPointer()->scooterBattType);
-        nextline(text,&textPointer);
+	//		textPointer += snprintf(&text[textPointer],25,"D%i  L%i  ",settingsGetPointer()->scooterDrag, settingsGetPointer()->scooterLoad);
+			textPointer += snprintf(&text[textPointer],25,"D%i  L%i  %i\016\016 Wh\017",settingsGetPointer()->scooterDrag, settingsGetPointer()->scooterLoad, settingsGetPointer()->scooterBattSize);
+	//		textPointer += bo4GetBatteryName(&text[textPointer], settingsGetPointer()->scooterBattType);
+			nextline(text,&textPointer);
+    	}
+    	else
+    	{
+            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);
+    	}
     }
+
     return StMHARD;
 }