# HG changeset patch # User Ideenmodellierer # Date 1612385148 -3600 # Node ID 8f78faf88fc56a167a8e5a7bbe4f705ed4d4f2f0 # Parent 6826731ff2be786ba3f00ac1008c2bb1f9d320c9 Adjustments for flipped display view: After some testing the t3_profile implementation in flipped mode some changes in the visualization were necessary to get a correct view. diff -r 6826731ff2be -r 8f78faf88fc5 Discovery/Src/gfx_engine.c --- a/Discovery/Src/gfx_engine.c Wed Feb 03 21:44:22 2021 +0100 +++ b/Discovery/Src/gfx_engine.c Wed Feb 03 21:45:48 2021 +0100 @@ -836,8 +836,8 @@ pDestination = (uint16_t*)hgfx->FBStartAdress; if(pSettings->FlipDisplay) { - pDestination += (800 - start.x) * hgfx->ImageHeight; - pDestination += (480 - start.y); + pDestination += (799 - start.x) * hgfx->ImageHeight; + pDestination += (479 - start.y); stepdir = -1; } else @@ -860,8 +860,8 @@ if(pSettings->FlipDisplay) { - pDestination += (800 - start.x) * hgfx->ImageHeight; - pDestination += (480 - start.y); + pDestination += (799 - start.x) * hgfx->ImageHeight; + pDestination += (479 - start.y); stepdir = -1; } else @@ -893,7 +893,7 @@ if(pSettings->FlipDisplay) { - pDestination += (((800 - x0) * hgfx->ImageHeight) + (480 - y0)); + pDestination += (((799 - x0) * hgfx->ImageHeight) + (479 - y0)); } else { @@ -1591,8 +1591,8 @@ } else { - pStart += (800 - LeftLow.x - 1) * hgfx->ImageHeight; - pStart += (480 - LeftLow.y); + pStart += (799 - LeftLow.x) * hgfx->ImageHeight; + pStart += (479 - LeftLow.y); stepdir = -1; } diff -r 6826731ff2be -r 8f78faf88fc5 Discovery/Src/t3.c --- a/Discovery/Src/t3.c Wed Feb 03 21:44:22 2021 +0100 +++ b/Discovery/Src/t3.c Wed Feb 03 21:45:48 2021 +0100 @@ -203,17 +203,17 @@ && (window->right > window->left)) { windowWidth = window->right - window->left; - if(settingsGetPointer()->FlipDisplay) - { - start.y = window->bottom; - stop.y = window->top; - } - else - { - start.y = 479 - window->bottom; - stop.y = 479 - window->top; - } + if(!settingsGetPointer()->FlipDisplay) + { + start.y = 479 - BigFontSeperationTopBottom + 5; + stop.y = 479 - 5; + } + else + { + start.y = 479 - BigFontSeperationTopBottom - 5; + stop.y =5; + } while((line <= windowWidth) && (dataIndex < datalength)) { factor = (10 * line * (long)datalength)/windowWidth; @@ -261,8 +261,10 @@ char text[TEXTSIZE]; point_t start, stop; uint16_t diveMinutes = 0; + const SDecoinfo * pDecoinfo; - const SDecoinfo * pDecoinfo; + SSettings* pSettings; + pSettings = settingsGetPointer(); if(stateUsed->diveSettings.deco_type.ub.standard == GF_MODE) { @@ -273,15 +275,24 @@ pDecoinfo = &stateUsed->decolistVPM; } - wintemp.left = t3c1.WindowX0; - wintemp.right = t3c1.WindowX0 + CV_PROFILE_WIDTH; - wintemp.top = 480 - BigFontSeperationTopBottom + 5; + wintemp.top = 479 - BigFontSeperationTopBottom + 5; wintemp.bottom = 479 - 5; + if(!pSettings->FlipDisplay) + { + wintemp.left = t3c1.WindowX0; + wintemp.right = t3c1.WindowX0 + CV_PROFILE_WIDTH; + } + else + { + wintemp.left = t3c1.WindowX1 - CV_PROFILE_WIDTH;; + wintemp.right = t3c1.WindowX1; + } + start.x = CV_PROFILE_WIDTH + 2; - start.y = t3c1.WindowY0; stop.x = start.x; - stop.y = t3c1.WindowY1; + start.y = 479 - BigFontSeperationTopBottom - 5; + stop.y =5; GFX_draw_line(&t3screen, start, stop, CLUT_Font020);