Rotate touch 180 so BL and TR match screen labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-17 18:36:16 +08:00
parent f2b14eb30f
commit 4f41621cc6
3 changed files with 6 additions and 2 deletions

View File

@@ -95,6 +95,10 @@ void touch_read_cb(lv_indev_t * /*indev*/, lv_indev_data_t *data) {
y = SCREEN_HEIGHT - 1;
}
// BL↔TR 对角反了:物理坐标整体旋转 180°
x = (int16_t)((SCREEN_WIDTH - 1) - x);
y = (int16_t)((SCREEN_HEIGHT - 1) - y);
// LVGL 270 → UI
g_dbg_phys_x = x;
g_dbg_phys_y = y;