class library for a TS Keypad and retrieving multiple keys, then press enter and the values are stored and the keypad disappears.
Diff: F7_TSKeypad_MultiKey.cpp
- Revision:
- 1:483300d6debd
- Parent:
- 0:b3fd90f94e58
--- a/F7_TSKeypad_MultiKey.cpp Wed Jun 07 08:45:35 2017 +0000 +++ b/F7_TSKeypad_MultiKey.cpp Tue Jun 20 12:00:18 2017 +0000 @@ -5,6 +5,7 @@ { btnsize = 50; state = 0; + key = 0; status = ts.Init(lcd.GetXSize(), lcd.GetYSize()); if (status != TS_OK) @@ -209,6 +210,7 @@ { state = 15; correcttouch = 1; + key = button; a = 3; b = 3; } @@ -222,7 +224,7 @@ }break; case 15: { - if(correcttouch == 1) + if(button == key && button != 0) { if(TS_State.touchDetected == 0) { @@ -230,7 +232,7 @@ state = 20; } } - else if(correcttouch == 0 && button == 0) + else if(button != key || button == 0) { state = 30; } @@ -405,7 +407,9 @@ m++; textx += 12; } - + + key = 0; + }break; case 30: {