AGH UST mbed part 3
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
Diff: Keyboard_Ts.cpp
- Revision:
- 1:36b3fd4a01fd
- Parent:
- 0:f4a48c08fea7
--- a/Keyboard_Ts.cpp Thu May 07 15:13:01 2020 +0000 +++ b/Keyboard_Ts.cpp Sat May 09 08:31:59 2020 +0000 @@ -9,16 +9,16 @@ TS_StateTypeDef TS_State; GetState(&TS_State); if ((TS_State.TouchDetected) && (TS_State.Y > 0 ) && (TS_State.Y < 80) && (TS_State.X > (80 * ucColIdx)) && (TS_State.X < (80 * (ucColIdx + 1)))) { - return BUTTON_1; + return BUTTON_0; } else if ((TS_State.TouchDetected) && (TS_State.Y > 80 ) && (TS_State.Y < 160) && (TS_State.X > (80 * ucColIdx)) && (TS_State.X < (80 * (ucColIdx + 1)))) { - return BUTTON_2; + return BUTTON_1; } else if ((TS_State.TouchDetected) && (TS_State.Y > 160 ) && (TS_State.Y < 240) && (TS_State.X > (80 * ucColIdx)) && (TS_State.X < (80 * (ucColIdx + 1)))) { - return BUTTON_3; + return BUTTON_2; } else if ((TS_State.TouchDetected) && (TS_State.Y > 240 ) && (TS_State.Y < 320) && (TS_State.X > (80 * ucColIdx)) && (TS_State.X < (80 * (ucColIdx + 1)))) { - return BUTTON_4; + return BUTTON_3; } else{ return RELASED;