Align touch and draw in one 320x240 space like CYD LVGL9.
Drop LVGL ROTATION_270 double-transform; SoftSPI rot3 maps directly to screen pixels. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -45,10 +45,10 @@ void setup() {
|
||||
|
||||
lv_init();
|
||||
|
||||
// 官方 CYD LVGL9:直接 320x240,不用 LV_DISPLAY_ROTATION_*(避免触控二次变换错位)
|
||||
// https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/tree/main/Examples/LVGL9
|
||||
lv_display_t *disp =
|
||||
lv_tft_espi_create(SCREEN_WIDTH, SCREEN_HEIGHT, draw_buf, sizeof(draw_buf));
|
||||
// 与 temperature 相同:TFT rot3 + LVGL 270;触点先算 UI 坐标再反变换喂给 LVGL
|
||||
lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_270);
|
||||
|
||||
lv_indev_t *indev = lv_indev_create();
|
||||
lv_indev_set_type(indev, LV_INDEV_TYPE_POINTER);
|
||||
|
||||
Reference in New Issue
Block a user