lvgl / lv_port_esp32

LVGL ported to ESP32 including various display and touchpad drivers
MIT License
1.06k stars 440 forks source link

Can't configure ILI9341 and XPT2046 for 2.8" TFT SPI 240X320 #281

Closed icodk closed 3 years ago

icodk commented 3 years ago

Works fine with Arduino ID and LV_Arduino 3.0.1 (both display and touch) However, looks strange with the lv_port_esp32 and touch is incorrect This is with Arduino ID and lv_arduino library 3.0.1. No problem scrolling the scroll bar. https://user-images.githubusercontent.com/15612908/120123233-f2af2680-c1ad-11eb-9a92-7d1bc30519cf.jpg

This is the lv_port_esp32 build with eclipse and idf plugin on Windows 10. lv widgets demo: the modal dialog fills the whole display width and the background windows is also too big. When touching, none of the buttons or the tabs responding but the background window is scrolling erratically https://user-images.githubusercontent.com/15612908/120123288-402b9380-c1ae-11eb-8c46-ec5e55218335.mp4

This is the sdkconfig used sdkconfig.txt Hope somebody can give me a clue Thanks

icodk commented 3 years ago

I found out. It was a matter of setting the right parameters in the sdkconfig file In my case this gave a reasonable performance:

CONFIG_LV_TOUCH_X_MIN=150
CONFIG_LV_TOUCH_Y_MIN=150
CONFIG_LV_TOUCH_X_MAX=2000
CONFIG_LV_TOUCH_Y_MAX=2000
CONFIG_LV_TOUCH_INVERT_X=y
CONFIG_LV_TOUCH_INVERT_Y=y
CONFIG_LV_TOUCH_DETECT_PRESSURE=y

however to get there it took some trial and error with different values.