Simple Bug fix

Files at this revision

API Documentation at this revision

Comitter:
paperclip
Date:
Sun May 03 16:59:21 2020 +0000
Parent:
2:53d9067a4feb
Commit message:
Fixed BSP_LCD_DisplayStringAt() Bug; CENTER_MODE and RIGHT_MODE not aligning correctly

Changed in this revision

Drivers/BSP/STM32F429I-Discovery/stm32f429i_discovery_lcd.c Show annotated file Show diff for this revision Revisions of this file
diff -r 53d9067a4feb -r d3798f9483b7 Drivers/BSP/STM32F429I-Discovery/stm32f429i_discovery_lcd.c
--- a/Drivers/BSP/STM32F429I-Discovery/stm32f429i_discovery_lcd.c	Wed Feb 28 13:17:14 2018 +0100
+++ b/Drivers/BSP/STM32F429I-Discovery/stm32f429i_discovery_lcd.c	Sun May 03 16:59:21 2020 +0000
@@ -625,7 +625,7 @@
   {
   case CENTER_MODE:
     {
-      refcolumn = X+ ((xsize - size)* DrawProp[ActiveLayer].pFont->Width) / 2;
+      refcolumn = X - size * DrawProp[ActiveLayer].pFont->Width / 2;
       break;
     }
   case LEFT_MODE:
@@ -635,7 +635,7 @@
     }
   case RIGHT_MODE:
     {
-      refcolumn = X + ((xsize - size)*DrawProp[ActiveLayer].pFont->Width);
+      refcolumn = X - size * DrawProp[ActiveLayer].pFont->Width;
       break;
     }
   default: