# HG changeset patch # User ideenmodellierer # Date 1560800839 -7200 # Node ID 7420ed6c350835a326a585038b20fc7e0de08aac # Parent e141b571a03da21ca2f07b0f34d22013f17825ec 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 diff -r e141b571a03d -r 7420ed6c3508 Discovery/Src/t7.c --- 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);