Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:b91bd75a5ab8, committed 2017-06-20
- Comitter:
- Armand
- Date:
- Tue Jun 20 12:01:11 2017 +0000
- Parent:
- 0:85ae7121f6d6
- Commit message:
- Fixed some bugs
Changed in this revision
| F7_Keypad_SingleKey.h | Show annotated file Show diff for this revision Revisions of this file |
| F7_TSKeypad_SingleKey.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 85ae7121f6d6 -r b91bd75a5ab8 F7_Keypad_SingleKey.h
--- a/F7_Keypad_SingleKey.h Tue Jun 06 13:58:55 2017 +0000
+++ b/F7_Keypad_SingleKey.h Tue Jun 20 12:01:11 2017 +0000
@@ -93,7 +93,7 @@
uint8_t state, btnsize;
int OK;
uint32_t Bckclr, Txtclr;
- uint8_t correcttouch, button;
+ uint8_t correcttouch, button, key;
uint16_t frstprsx, frstprsy;
char keypressed;
int a, b, recv;
diff -r 85ae7121f6d6 -r b91bd75a5ab8 F7_TSKeypad_SingleKey.cpp
--- a/F7_TSKeypad_SingleKey.cpp Tue Jun 06 13:58:55 2017 +0000
+++ b/F7_TSKeypad_SingleKey.cpp Tue Jun 20 12:01:11 2017 +0000
@@ -7,6 +7,7 @@
{
btnsize = 50;
state = 0;
+ key = 0;
status = ts.Init(lcd.GetXSize(), lcd.GetYSize());
if (status != TS_OK)
@@ -201,6 +202,7 @@
{
state = 15;
correcttouch = 1;
+ key = button;
a = 3;
b = 3;
}
@@ -214,14 +216,14 @@
}break;
case 15:
{
- if(correcttouch == 1)
+ if(button == key && button != 0)
{
if(TS_State.touchDetected== 0)
{
state = 20;
}
}
- else if(correcttouch == 0 && button == 0)
+ else if(button != key || button == 0)
{
state = 30;
}
@@ -373,7 +375,9 @@
recv = 0;
correcttouch = 0;
state = 0;
- }
+ }
+
+ key = 0;
}break;
case 30: