Restore landscape display and use RNT SoftSPI touch map.
Revert 320x240 create that garbled the panel; map touch to 240x320 like Random Nerd Tutorials. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -45,10 +45,11 @@ void setup() {
|
||||
|
||||
lv_init();
|
||||
|
||||
// 官方 CYD LVGL9:直接 320x240,不用 LV_DISPLAY_ROTATION_*(避免触控二次变换错位)
|
||||
// https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/tree/main/Examples/LVGL9
|
||||
// RNT / temperature:240x320 + ROTATION_270 → 横屏(勿改成 create 320x240,会花屏)
|
||||
// https://randomnerdtutorials.com/lvgl-cheap-yellow-display-esp32-2432s028r/
|
||||
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);
|
||||
|
||||
lv_indev_t *indev = lv_indev_create();
|
||||
lv_indev_set_type(indev, LV_INDEV_TYPE_POINTER);
|
||||
|
||||
Reference in New Issue
Block a user