Rotate touch 180 so BL and TR match screen labels.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user