Align touch with temperature XPT2046 driver and LVGL inverse map.

Mux VSPI between SD and touch; map like climate UI then undo ROTATION_270 so buttons hit.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-17 18:07:18 +08:00
parent d874cb192c
commit 156d9cf583
9 changed files with 99 additions and 94 deletions

View File

@@ -47,7 +47,7 @@ void setup() {
lv_display_t *disp =
lv_tft_espi_create(SCREEN_WIDTH, SCREEN_HEIGHT, draw_buf, sizeof(draw_buf));
// 横屏;触点报物理 240x320,由 LVGL 做旋转变换
// 与 temperature 相同:TFT rot3 + LVGL 270;触点先算 UI 坐标再反变换喂给 LVGL
lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_270);
lv_indev_t *indev = lv_indev_create();