Fix touch screen not responding, but screen still not refreshed.

This commit is contained in:
GW_MC
2026-01-25 15:51:49 +08:00
parent 57f698425b
commit 259660a0bc
3 changed files with 117 additions and 44 deletions

View File

@@ -87,7 +87,9 @@ void app_main(void) {
// Initialize display and touch
display_handler->init();
ESP_LOGV(TAG, "Starting touch task...\n");
display_handler->start_touch_task();
ESP_LOGV(TAG, "Touch task started.\n");
//
// LVGL tick timer
auto lvgl_tick_timer_callback = [](TimerHandle_t xTimer) {
@@ -97,6 +99,7 @@ void app_main(void) {
if (lvgl_tick_period == 0) {
lvgl_tick_period = 1; // ensure at least 1 tick to avoid FreeRTOS assert
}
ESP_LOGV(TAG, "Creating LVGL tick timer with period %u ticks...\n", (unsigned)lvgl_tick_period);
TimerHandle_t lvgl_tick_timer = xTimerCreate(
"lvgl_tick_timer",
lvgl_tick_period,
@@ -109,6 +112,7 @@ void app_main(void) {
vTaskDelay(5000 / portTICK_PERIOD_MS);
return esp_restart();
}
ESP_LOGV(TAG, "Starting LVGL tick timer...\n");
xTimerStart(lvgl_tick_timer, 0);
//