Use Sunton 2432S028R official touch map and fix lower-left offset.

Match board JSON X/Y cmds and MIRROR_X; shift UI +45,-45 from red-vs-finger logs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-17 18:25:34 +08:00
parent 01c52661e4
commit 8a29196a39
5 changed files with 71 additions and 44 deletions

View File

@@ -45,8 +45,8 @@ void setup() {
lv_init();
// RNT / temperature:240x320 + ROTATION_270 → 横屏(勿改成 create 320x240,会花屏)
// https://randomnerdtutorials.com/lvgl-cheap-yellow-display-esp32-2432s028r/
// Sunton 官方:240x320 + ROTATION_270 → 横屏(勿 create 320x240,会花屏)
// 触摸见 touch.cpp(官方 mirror_x + 日志补偿)
lv_display_t *disp =
lv_tft_espi_create(SCREEN_WIDTH, SCREEN_HEIGHT, draw_buf, sizeof(draw_buf));
lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_270);