changeset 315:7420ed6c3508 Bugfix_Flip_FirmwareUpdate

Bugfix Overview, O2 values and mV in flip display mode The customer views sometime used the screen orientation values set by a previous view. In case this view is deactivated the display of some customer view in flipped mode were wrong. Added orientation update which will be reset after update to avoid impact to other customer views
author ideenmodellierer
date Mon, 17 Jun 2019 21:47:19 +0200
parents e141b571a03d
children 4da2bffb07ca
files Discovery/Src/t7.c
diffstat 1 files changed, 38 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Mon Jun 17 21:46:56 2019 +0200
+++ b/Discovery/Src/t7.c	Mon Jun 17 21:47:19 2019 +0200
@@ -1834,7 +1834,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:
@@ -1864,7 +1872,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:
@@ -3055,6 +3071,11 @@
         fCNS = 999;
 
     t7cY0free.WindowY0 = t7cC.WindowY0 - 10;
+    if(settingsGetPointer()->FlipDisplay)
+    {
+    	t7cY0free.WindowY1 = 400;
+    }
+
     t7cY0free.WindowLineSpacing = 48;
     t7cY0free.WindowNumberOfTextLines = 6;
     t7cY0free.WindowTab = 420;
@@ -3079,12 +3100,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);