From d72cbd956662d54921b1706e1b317adca97e84fe Mon Sep 17 00:00:00 2001 From: mverch67 Date: Mon, 26 Feb 2024 18:12:42 +0100 Subject: [PATCH] add tft task loop to main() --- src/main.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index a0a39ec0e..1291a73c6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -969,4 +969,15 @@ void loop() mainDelay.delay(delayMsec); } // if (didWake) LOG_DEBUG("wake!\n"); -} \ No newline at end of file +} + +#if HAS_TFT +void tft_task_handler(void) +{ + while (true) { + if (deviceScreen) + deviceScreen->task_handler(); + delay(20); + } +} +#endif \ No newline at end of file