Mercurial > public > ostc4
changeset 826:a370741a743b Evo_2_23
Bugfix Line order of info screen with flip screen active:
In the previous version the order of the line in flipping mode (top to bottom) was 6,5,4,3,2,1 instead of 1,2,3,4,5,6. This effected the compass calibration as well as the sensor info view. The problem was solved by adapting the Y calculation.
In addition the size of the SensorInfo screen was corrected to avoid clipping issues in flipped mode.
author | Ideenmodellierer |
---|---|
date | Wed, 11 Oct 2023 17:49:19 +0200 |
parents | 2a9a47547b05 |
children | ffb1036c27c2 |
files | Discovery/Src/tInfo.c Discovery/Src/tInfoSensor.c |
diffstat | 2 files changed, 22 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/tInfo.c Mon Oct 09 16:50:11 2023 +0200 +++ b/Discovery/Src/tInfo.c Wed Oct 11 17:49:19 2023 +0200 @@ -309,10 +309,21 @@ hgfx.WindowX0 = XleftGimpStyle; hgfx.WindowX1 = XrightGimpStyle; hgfx.WindowY1 = 479 - YtopGimpStyle; - if(hgfx.WindowY1 < Font->height) - hgfx.WindowY0 = 0; + + + if(!settingsGetPointer()->FlipDisplay) + { + hgfx.WindowY1 = 479 - YtopGimpStyle; + if(hgfx.WindowY1 < Font->height) + hgfx.WindowY0 = 0; + else + hgfx.WindowY0 = hgfx.WindowY1 - Font->height; + } else - hgfx.WindowY0 = hgfx.WindowY1 - Font->height; + { + hgfx.WindowY0 = YtopGimpStyle; + hgfx.WindowY1 = YtopGimpStyle + Font->height; + } GFX_write_string_color(Font, &hgfx, text, 0, color); }
--- a/Discovery/Src/tInfoSensor.c Mon Oct 09 16:50:11 2023 +0200 +++ b/Discovery/Src/tInfoSensor.c Wed Oct 11 17:49:19 2023 +0200 @@ -157,7 +157,7 @@ text[4] = ' '; text[5] = '1' + activeSensorId; text[6] = 0; - tInfo_write_content_simple( 30, 340, ME_Y_LINE_BASE, &FontT48, text, CLUT_MenuPageHardware); + tInfo_write_content_simple( 30, 770, ME_Y_LINE_BASE, &FontT48, text, CLUT_MenuPageHardware); pDiveO2Data = (SSensorDataDiveO2*)&stateRealGetPointer()->lifeData.extIf_sensor_data[activeSensorId]; @@ -166,9 +166,9 @@ { uint64ToString(pDiveO2Data->sensorId,&text[strIndex]); } - tInfo_write_content_simple( 30, 340, ME_Y_LINE1, &FontT48, text, CLUT_Font020); + tInfo_write_content_simple( 30, 770, ME_Y_LINE1, &FontT48, text, CLUT_Font020); snprintf(text,32,"%c: %02.1f",TXT_Temperature , (float)pDiveO2Data->temperature / 1000.0); - tInfo_write_content_simple( 30, 340, ME_Y_LINE2, &FontT48, text, CLUT_Font020); + tInfo_write_content_simple( 30, 770, ME_Y_LINE2, &FontT48, text, CLUT_Font020); #ifdef ENABLE_EXTERNAL_PRESSURE pressure = (float)(stateRealGetPointer()->lifeData.ppO2Sensor_bar[2]); @@ -177,14 +177,14 @@ #endif snprintf(text,32,"Druck: %02.1f (%02.1f)", (float)pDiveO2Data->pressure / 1000.0, pressure *1000.0); - tInfo_write_content_simple( 30, 340, ME_Y_LINE3, &FontT48, text, CLUT_Font020); + tInfo_write_content_simple( 30, 770, ME_Y_LINE3, &FontT48, text, CLUT_Font020); snprintf(text,32,"Feuchtigkeit: %02.1f", (float)pDiveO2Data->humidity / 1000.0); - tInfo_write_content_simple( 30, 340, ME_Y_LINE4, &FontT48, text, CLUT_Font020); + tInfo_write_content_simple( 30, 770, ME_Y_LINE4, &FontT48, text, CLUT_Font020); snprintf(text,32,"Status: 0x%lx", pDiveO2Data->status); - tInfo_write_content_simple( 30, 340, ME_Y_LINE5, &FontT48, text, CLUT_Font020); + tInfo_write_content_simple( 30, 770, ME_Y_LINE5, &FontT48, text, CLUT_Font020); #ifdef ENABLE_EXTERNAL_PRESSURE snprintf(text,32,"Norm ppO2: %02.3f (%02.1f)", (float)(stateRealGetPointer()->lifeData.ppO2Sensor_bar[0] / (pressure / 1000.0)),(float)(stateRealGetPointer()->lifeData.ppO2Sensor_bar[0])); - tInfo_write_content_simple( 30, 340, ME_Y_LINE6, &FontT48, text, CLUT_Font020); + tInfo_write_content_simple( 30, 770, ME_Y_LINE6, &FontT48, text, CLUT_Font020); #endif if(sensorActive) @@ -205,7 +205,7 @@ snprintf(textPointer, 20,": %01.2f, %01.1f mV", pStateReal->lifeData.ppO2Sensor_bar[activeSensorId], pStateReal->lifeData.sensorVoltage_mV[activeSensorId]); - tInfo_write_content_simple( 30, 340, ME_Y_LINE6, &FontT48, text, CLUT_Font020); + tInfo_write_content_simple( 30, 770, ME_Y_LINE6, &FontT48, text, CLUT_Font020); tInfo_write_buttonTextline_simple(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,0); }