** Function: InputHandler ** Handles the variables PrevPress, NextPress, SelPress, AnyKeyPress and EscPress **********************************************************************/
| 45 | ** Handles the variables PrevPress, NextPress, SelPress, AnyKeyPress and EscPress |
| 46 | **********************************************************************/ |
| 47 | void InputHandler(void) { |
| 48 | static long tm = launcherMillis(); |
| 49 | if (launcherMillis() - tm > 200 || LongPress) { |
| 50 | M5.update(); |
| 51 | auto t = M5.Touch.getDetail(); |
| 52 | if (t.isPressed() || t.isHolding()) { |
| 53 | // launcherConsolePrintf("x1=%d, y1=%d, ", t.x, t.y); |
| 54 | tm = launcherMillis(); |
| 55 | if (!wakeUpScreen()) AnyKeyPress = true; |
| 56 | else return; |
| 57 | // launcherConsolePrintf("x2=%d, y2=%d, rot=%d\n", t.x, t.y, rotation); |
| 58 | |
| 59 | // Touch point global variable |
| 60 | touchPoint.x = t.x; |
| 61 | touchPoint.y = t.y; |
| 62 | touchPoint.pressed = true; |
| 63 | touchHeatMap(touchPoint); |
| 64 | } else touchPoint.pressed = false; |
| 65 | } |
| 66 | } |
| 67 | /********************************************************************* |
| 68 | ** Function: powerOff |
| 69 | ** location: mykeyboard.cpp |
nothing calls this directly
no test coverage detected