| 58 | |
| 59 | TaskHandle_t xHandle; |
| 60 | void __attribute__((weak)) taskInputHandler(void *parameter) { |
| 61 | auto timer = millis(); |
| 62 | while (true) { |
| 63 | checkPowerSaveTime(); |
| 64 | // Sometimes this task run 2 or more times before looptask, |
| 65 | // and navigation gets stuck, the idea here is run the input detection |
| 66 | // if AnyKeyPress is false, or rerun if it was not renewed within 75ms (arbitrary) |
| 67 | // because AnyKeyPress will be true if didn´t passed through a check(bool var) |
| 68 | if (!AnyKeyPress || millis() - timer > 75) { |
| 69 | NextPress = false; |
| 70 | PrevPress = false; |
| 71 | UpPress = false; |
| 72 | DownPress = false; |
| 73 | SelPress = false; |
| 74 | EscPress = false; |
| 75 | AnyKeyPress = false; |
| 76 | SerialCmdPress = false; |
| 77 | NextPagePress = false; |
| 78 | PrevPagePress = false; |
| 79 | touchPoint.pressed = false; |
| 80 | touchPoint.Clear(); |
| 81 | #ifndef USE_TFT_eSPI_TOUCH |
| 82 | InputHandler(); |
| 83 | #endif |
| 84 | timer = millis(); |
| 85 | } |
| 86 | vTaskDelay(pdMS_TO_TICKS(10)); |
| 87 | } |
| 88 | } |
| 89 | // Public Globals Variables |
| 90 | unsigned long previousMillis = millis(); |
| 91 | int prog_handler; // 0 - Flash, 1 - LittleFS, 3 - Download |
nothing calls this directly
no test coverage detected