comparison Discovery/Src/tInfo.c @ 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 b9f699d2e3d0
children 17d9d6eddd8d
comparison
equal deleted inserted replaced
824:2a9a47547b05 826:a370741a743b
307 hgfx.WindowLineSpacing = 0; 307 hgfx.WindowLineSpacing = 0;
308 hgfx.WindowTab = 400; 308 hgfx.WindowTab = 400;
309 hgfx.WindowX0 = XleftGimpStyle; 309 hgfx.WindowX0 = XleftGimpStyle;
310 hgfx.WindowX1 = XrightGimpStyle; 310 hgfx.WindowX1 = XrightGimpStyle;
311 hgfx.WindowY1 = 479 - YtopGimpStyle; 311 hgfx.WindowY1 = 479 - YtopGimpStyle;
312 if(hgfx.WindowY1 < Font->height) 312
313 hgfx.WindowY0 = 0; 313
314 else 314 if(!settingsGetPointer()->FlipDisplay)
315 hgfx.WindowY0 = hgfx.WindowY1 - Font->height; 315 {
316 hgfx.WindowY1 = 479 - YtopGimpStyle;
317 if(hgfx.WindowY1 < Font->height)
318 hgfx.WindowY0 = 0;
319 else
320 hgfx.WindowY0 = hgfx.WindowY1 - Font->height;
321 }
322 else
323 {
324 hgfx.WindowY0 = YtopGimpStyle;
325 hgfx.WindowY1 = YtopGimpStyle + Font->height;
326 }
316 327
317 GFX_write_string_color(Font, &hgfx, text, 0, color); 328 GFX_write_string_color(Font, &hgfx, text, 0, color);
318 } 329 }
319 330
320 /* Exported functions --------------------------------------------------------*/ 331 /* Exported functions --------------------------------------------------------*/