lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
250 stars 161 forks source link

xpt2046 touch panel calibration problem #111

Closed uraich closed 3 years ago

uraich commented 3 years ago

Calibrating the touch panel when in Portrait mode works without problem. In this case touch panel (0,0) corresponds to the top left corner of the display. However, when switching to portrait mode touch panel (0,0) is the top right of the display. This means that for increasing touch panel x values we get decreasing values on the display. This situation cannot be handled with calibration values. In order to treat it the xpt2046 driver would need to know the state of the display driver (portrait or landscape)

uraich commented 3 years ago

Sorry, forget it! The problem was that I did not define transpose correctly. I updated tpcal to lvgl v7 and it works ok now