lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
237 stars 156 forks source link

Share the problems I encountered when using the driver and the temporary solutions #344

Open yusuhua opened 1 month ago

yusuhua commented 1 month ago
  1. The board is Rp2 PICO, and the display is ili9341 Problem encountered: Object color inversion Temporary solution: https://github.com/lvgl/lv_binding_micropython/blob/master/driver/generic/ili9xxx.py Add _INVERT = const(0x21) after line 78, and add (_INVERT, None) after line 147.

  2. The board is esp32, and the display is ili9341 Problem encountered: Display rotation abnormality when rot=LANDSCAPE or REVERSE_LANDSCAPE Temporary solution: https://github.com/lvgl/lv_binding_micropython/blob/master/driver/esp32/ili9XXX.py Add rot=PORTRAIT, before invert=False in line 65, and add

        if (rot in [LANDSCAPE, REVERSE_LANDSCAPE]):
            self.width = height
            self.height = width

    after line 80, and add rot=rot, before invert=invert in line 542.