MBED1_d2

Dependencies:   MBED1zadD2 mbed BSP_DISCO_F429ZI

Files at this revision

API Documentation at this revision

Comitter:
filipksiezyc
Date:
Mon May 25 13:41:17 2020 +0000
Parent:
0:a4ef65ad159f
Commit message:
MBED1_D2_FINAL;

Changed in this revision

KeyboardTsLcd.cpp Show annotated file Show diff for this revision Revisions of this file
Keyboard_Ts.cpp Show annotated file Show diff for this revision Revisions of this file
Led_Lcd.cpp Show annotated file Show diff for this revision Revisions of this file
Led_Lcd.h Show annotated file Show diff for this revision Revisions of this file
--- a/KeyboardTsLcd.cpp	Sat May 23 18:55:52 2020 +0000
+++ b/KeyboardTsLcd.cpp	Mon May 25 13:41:17 2020 +0000
@@ -1,7 +1,7 @@
 #include "KeyboardTsLcd.h"
 
 KeyboardTsLcd::KeyboardTsLcd(unsigned char _ucColumn){
-    pKeyboard = new KeyboardTs(0);   
+    pKeyboard = new KeyboardTs(_ucColumn);   
     pLed = new LedLcd(_ucColumn);
 }
 
--- a/Keyboard_Ts.cpp	Sat May 23 18:55:52 2020 +0000
+++ b/Keyboard_Ts.cpp	Mon May 25 13:41:17 2020 +0000
@@ -10,13 +10,13 @@
     LCD_Touch.GetState(&TS_State);
     
     if((TS_State.X>(80*uiColumnNumber))&&(TS_State.X<(81+uiColumnNumber*80))){
-        if((TS_State.Y>0)&&(TS_State.Y<82))
+        if((TS_State.Y>0)&&(TS_State.Y<81))
             return BUTTON_0;
-        else if((TS_State.Y>81)&&(TS_State.Y<162))
+        else if((TS_State.Y>80)&&(TS_State.Y<161))
             return BUTTON_1;
-        else if((TS_State.Y>161)&&(TS_State.Y<242))
+        else if((TS_State.Y>160)&&(TS_State.Y<241))
             return BUTTON_2;
-        else if((TS_State.Y>241)&&(TS_State.Y<320))
+        else if((TS_State.Y>240)&&(TS_State.Y<320))
             return BUTTON_3;
         else 
         return NONE;
--- a/Led_Lcd.cpp	Sat May 23 18:55:52 2020 +0000
+++ b/Led_Lcd.cpp	Mon May 25 13:41:17 2020 +0000
@@ -13,7 +13,7 @@
 void  LedLcd::DrawKey(unsigned char ucKeyNumber){
     LCD_Display.SetTextColor(LCD_COLOR_GREEN);  
     LCD_Display.DrawRect((80*uiColumnNumber) ,ucKeyNumber*80,80,80);
-    LCD_Display.SetTextColor(Color[ucKeyNumber]);
+    LCD_Display.SetTextColor(uiColor[ucKeyNumber]);
     LCD_Display.FillRect(1+80*uiColumnNumber , 1+ucKeyNumber*80, 79, 79);
     
     LCD_Display.SetTextColor(LCD_COLOR_RED);
@@ -29,10 +29,10 @@
     uint8_t CurrentKey;
     for(CurrentKey=0; CurrentKey<NUMBER_OF_KEYS; CurrentKey++){
         if(CurrentKey==ucKeyNumber){
-            Color[CurrentKey]=LCD_COLOR_GREEN;
+            uiColor[CurrentKey]=LCD_COLOR_GREEN;
             }
         else{
-            Color[CurrentKey]=LCD_COLOR_BLUE;
+            uiColor[CurrentKey]=LCD_COLOR_BLUE;
             }
         DrawKey(CurrentKey);
         }
--- a/Led_Lcd.h	Sat May 23 18:55:52 2020 +0000
+++ b/Led_Lcd.h	Mon May 25 13:41:17 2020 +0000
@@ -6,7 +6,7 @@
 
 class LedLcd{
     private:
-        uint32_t Color[NUMBER_OF_KEYS];
+        uint32_t uiColor[NUMBER_OF_KEYS];
         uint16_t uiColumnNumber;
         LCD_DISCO_F429ZI LCD_Display;
         void DrawKey(unsigned char ucKeyNumber);