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