diff Discovery/Src/t7.c @ 367:e309f78f89a5 MotionDetection

Merge default
author Ideenmodellierer
date Sat, 20 Jul 2019 21:42:45 +0200
parents 3c7030d6d67a 7420ed6c3508
children 210bffc496a3
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Mon Jun 17 19:56:38 2019 +0200
+++ b/Discovery/Src/t7.c	Sat Jul 20 21:42:45 2019 +0200
@@ -1864,7 +1864,15 @@
         t7cC.WindowLineSpacing = 95;
         t7cC.WindowNumberOfTextLines = 3;
         text[textpointer] = 0;
+        if(pSettings->FlipDisplay)
+        {
+        	t7cC.WindowY1 -= 40;
+        }
         GFX_write_string(&FontT105,&t7cC,text,1);
+        if(pSettings->FlipDisplay)
+        {
+        	t7cC.WindowY1 += 40;
+        }
         break;
 
     case CVIEW_sensors_mV:
@@ -1894,7 +1902,15 @@
         t7cC.WindowLineSpacing = 95;
         t7cC.WindowNumberOfTextLines = 3;
         text[textpointer] = 0;
+        if(pSettings->FlipDisplay)
+        {
+        	t7cC.WindowY1 -= 40;
+        }
         GFX_write_string(&FontT48,&t7cC,text,1);
+        if(pSettings->FlipDisplay)
+        {
+        	t7cC.WindowY1 += 40;
+        }
         break;
 
     case CVIEW_Compass:
@@ -3085,6 +3101,11 @@
         fCNS = 999;
 
     t7cY0free.WindowY0 = t7cC.WindowY0 - 10;
+    if(settingsGetPointer()->FlipDisplay)
+    {
+    	t7cY0free.WindowY1 = 400;
+    }
+
     t7cY0free.WindowLineSpacing = 48;
     t7cY0free.WindowNumberOfTextLines = 6;
     t7cY0free.WindowTab = 420;
@@ -3109,12 +3130,23 @@
     text[textpointer++] = TXT_FutureTTS;
     text[textpointer++] = '\017';
     text[textpointer++] = 0;
-    t7cY0free.WindowX0 += 10;
-    t7cY0free.WindowY0 += 10;
-    GFX_write_string(&FontT24, &t7cY0free, text, 1);
-    t7cY0free.WindowX0 -= 10;
-    t7cY0free.WindowY0 -= 10;
-
+
+    if(!settingsGetPointer()->FlipDisplay)
+    {
+		t7cY0free.WindowX0 += 10;
+		t7cY0free.WindowY0 += 10;
+		GFX_write_string(&FontT24, &t7cY0free, text, 1);
+		t7cY0free.WindowX0 -= 10;
+		t7cY0free.WindowY0 -= 10;
+    }
+    else
+    {
+		t7cY0free.WindowY1 -= 10;
+		t7cY0free.WindowX1 -= 10;
+		GFX_write_string(&FontT24, &t7cY0free, text, 1);
+		t7cY0free.WindowY1 += 10;
+		t7cY0free.WindowX1 += 10;
+    }
     textpointer = 0;
     text[textpointer++] = '\t';
     textpointer += snprintf(&text[textpointer],10,"\020%01.2f",	stateUsed->lifeData.ppO2);