code review

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Revision:
0:db2c7dc10f89
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LedLcd.cpp	Thu May 14 18:45:14 2020 +0000
@@ -0,0 +1,34 @@
+#include "LedLcd.h"
+
+
+
+
+LedLcd::LedLcd(unsigned char ucStartCol){
+    lcd.Clear(LCD_COLOR_BLACK);
+    lcd.SetFont(&Font24);
+    ucColumn = ucStartCol;
+    }
+    
+void LedLcd::On( unsigned char ucPos){
+    
+    uint8_t text[2];
+    unsigned char ucRect;
+    
+    for (ucRect=0;ucRect<4;ucRect++){
+    
+    lcd.SetTextColor(LCD_COLOR_GREEN);
+    lcd.DrawRect(ucColumn*80,ucRect*80,80,80);
+    
+    if(ucPos==ucRect)
+        lcd.SetTextColor(LCD_COLOR_YELLOW);
+    else
+        lcd.SetTextColor(LCD_COLOR_BLUE);
+        
+    lcd.FillRect(1 + ucColumn*80,ucRect*80+1,78,78);
+    lcd.SetBackColor(LCD_COLOR_RED);
+    lcd.SetTextColor(LCD_COLOR_WHITE);
+    sprintf((char*)text, "%d", ucRect);
+    lcd.DisplayStringAt(ucColumn*80, ucRect*80,(uint8_t *)&text,LEFT_MODE);
+    
+        }
+    }
\ No newline at end of file