Mercurial > public > ostc4
changeset 1006:75f958ca5d0e GasConsumption
Minor modification activ gas indicator:
On the main screen the active gas is visualized by a number and a box around it.The box as well as the number started at coordinate 0 resultiong of a very close drawing of box and number. To improve this a small gap is added between box and number and the box itself was enlarged. With the OSTC5 a problem with the pixel sync was solfed which caused the first column to not be drawn.
author | Ideenmodellierer |
---|---|
date | Sat, 03 May 2025 17:52:05 +0200 (3 months ago) |
parents | 85f7e19c6688 |
children | 65d35e66efb9 |
files | Discovery/Src/display.c Discovery/Src/gfx_engine.c Discovery/Src/t7.c |
diffstat | 3 files changed, 21 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/display.c Sat May 03 17:47:53 2025 +0200 +++ b/Discovery/Src/display.c Sat May 03 17:52:05 2025 +0200 @@ -407,7 +407,7 @@ aTxBuffer[1] = OLED_VFP_SET_13h; send((uint8_t*)aTxBuffer, 2); aTxBuffer[0] = 0x72; - aTxBuffer[1] = 0x08; + aTxBuffer[1] = 0x0C; send((uint8_t*)aTxBuffer, 2); aTxBuffer[0] = 0x70;
--- a/Discovery/Src/gfx_engine.c Sat May 03 17:47:53 2025 +0200 +++ b/Discovery/Src/gfx_engine.c Sat May 03 17:52:05 2025 +0200 @@ -3483,7 +3483,7 @@ #define Vsync_d1 2 #define VFP_d1 4 // make sure this value * VSYNC is also set in display.c for OLED_VFP_SET -#define VBP_d1 4 // make sure this value * VSYNC is also set in display.c for OLED_VBP_SET +#define VBP_d1 6 // make sure this value * VSYNC is also set in display.c for OLED_VBP_SET /* Horizontal synchronization width = Hsync - 1 */ LtdcHandle.Init.HorizontalSync = Hsync_d1 - 1;
--- a/Discovery/Src/t7.c Sat May 03 17:47:53 2025 +0200 +++ b/Discovery/Src/t7.c Sat May 03 17:52:05 2025 +0200 @@ -1065,6 +1065,7 @@ else { textIdx = 0; + if(isLoopMode(stateUsed->diveSettings.diveMode)) gasOffset = NUM_OFFSET_DILUENT; else @@ -1095,9 +1096,23 @@ text[textIdx++] = 10; } text[textIdx++] = 0; + if(!pSettings->FlipDisplay) + { + t7surfaceL.WindowX0 +=5; + } + else + { + t7surfaceL.WindowX1 -=2; + } GFX_write_string(&FontT48,&t7surfaceL,text,6); - - + if(!pSettings->FlipDisplay) + { + t7surfaceL.WindowX0 -=5; + } + else + { + t7surfaceL.WindowX1 +=2; + } oxygen_percentage = 100; oxygen_percentage -= stateUsed->lifeData.actualGas.nitrogen_percentage; oxygen_percentage -= stateUsed->lifeData.actualGas.helium_percentage; @@ -1121,7 +1136,7 @@ if(!pSettings->FlipDisplay) { start.y = t7surfaceL.WindowY0 + (3 * t7surfaceL.WindowLineSpacing); - start.x = t7surfaceL.WindowX0 + ((stateUsed->lifeData.actualGas.GasIdInSettings - gasOffset - 1) * 35); + start.x = t7surfaceL.WindowX0 + ((stateUsed->lifeData.actualGas.GasIdInSettings - gasOffset - 1) * 35) + 2; } else { @@ -1129,7 +1144,7 @@ start.x = t7surfaceR.WindowX0 + ((stateUsed->lifeData.actualGas.GasIdInSettings - gasOffset - 1) * 35); } - stop.x = start.x + 25; + stop.x = start.x + 29; stop.y = start.y + 52; GFX_draw_box2(&t7screen, start, stop, CLUT_Font020, 1); }