Mbed touchscreed project. To be corrected

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Files at this revision

API Documentation at this revision

Comitter:
piotrlopata
Date:
Tue May 19 08:09:29 2020 +0000
Parent:
6:fc42ae7ee145
Commit message:
FinalFinal this time

Changed in this revision

Keyboard_Ts.cpp Show annotated file Show diff for this revision Revisions of this file
Keyboard_Ts.h 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/Keyboard_Ts.cpp	Tue May 12 10:12:04 2020 +0000
+++ b/Keyboard_Ts.cpp	Tue May 19 08:09:29 2020 +0000
@@ -1,12 +1,12 @@
 #include "Keyboard_Ts.h"
 
-KeyboardTs::KeyboardTs(uint16_t columnNumber){
-    ColumnX = columnNumber*80;
+KeyboardTs::KeyboardTs(uint16_t uiColumnNumber){
+    uiColumnX = uiColumnNumber*80;
 }
 
 enum Buttons KeyboardTs::eRead(void) {
     ts.GetState(&TS_State);
-    if((! TS_State.TouchDetected) || !((TS_State.X>ColumnX) && (TS_State.X<ColumnX+80)) ) return NOT_A_BUTTON;
+    if((! TS_State.TouchDetected) || !((TS_State.X>uiColumnX) && (TS_State.X<uiColumnX+80)) ) return NOT_A_BUTTON;
     else if( (TS_State.Y>0) && (TS_State.Y<80) ) return BUTTON_0;
     else if( (TS_State.Y>80) && (TS_State.Y<160) ) return BUTTON_1;
     else if( (TS_State.Y>160) && (TS_State.Y<240) ) return BUTTON_2;
--- a/Keyboard_Ts.h	Tue May 12 10:12:04 2020 +0000
+++ b/Keyboard_Ts.h	Tue May 19 08:09:29 2020 +0000
@@ -7,7 +7,7 @@
 
 class KeyboardTs {
     private: 
-        uint16_t ColumnX;
+        uint16_t uiColumnX;
         TS_DISCO_F429ZI ts;
         TS_StateTypeDef TS_State;
     public: 
--- a/Led_Lcd.cpp	Tue May 12 10:12:04 2020 +0000
+++ b/Led_Lcd.cpp	Tue May 19 08:09:29 2020 +0000
@@ -2,23 +2,23 @@
 
 char* pText[] = {"0", "1", "2", "3"};
 
-LedLcd::LedLcd(uint16_t columnNumber) {
-    ColumnX = columnNumber*80;
+LedLcd::LedLcd(uint16_t uiColumnNumber) {
+    uiColumnX = uiColumnNumber*80;
     
-    BSP_LCD_SetFont(&Font24);
+    lcd.SetFont(&Font24);
     lcd.Clear(LCD_COLOR_BLACK);
     lcd.SetBackColor(LCD_COLOR_RED);
 }
 
-void LedLcd::On(uint16_t chosenSquare) {
+void LedLcd::On(uint16_t uiChosenSquare) {
     for(uint16_t i=0; i<4; i++) {
         lcd.SetTextColor(LCD_COLOR_GREEN);
-        lcd.DrawRect(ColumnX, i*80, 80, 80); 
+        lcd.DrawRect(uiColumnX, i*80, 80, 80); 
         //-----------------------------------------------------------------
-        if( chosenSquare != i) lcd.SetTextColor(LCD_COLOR_BLUE);
-        lcd.FillRect(ColumnX+1, (80*i)+1 , 78, 78);
+        if( uiChosenSquare != i) lcd.SetTextColor(LCD_COLOR_BLUE);
+        lcd.FillRect(uiColumnX+1, (80*i)+1 , 78, 78);
         //-----------------------------------------------------------------
         lcd.SetTextColor(LCD_COLOR_WHITE);
-        lcd.DisplayStringAt(ColumnX, i*80, (uint8_t *) pText[i], LEFT_MODE);
+        lcd.DisplayStringAt(uiColumnX, i*80, (uint8_t *)pText[i], LEFT_MODE);
         }
 }
--- a/Led_Lcd.h	Tue May 12 10:12:04 2020 +0000
+++ b/Led_Lcd.h	Tue May 19 08:09:29 2020 +0000
@@ -5,7 +5,7 @@
 
 class LedLcd {
     private:
-        uint16_t ColumnX;
+        uint16_t uiColumnX;
         LCD_DISCO_F429ZI lcd;
     public:
         LedLcd(uint16_t);