diff --git a/lib/lib_display/Xlatb_RA8876-gemu-1.0/RA8876.cpp b/lib/lib_display/Xlatb_RA8876-gemu-1.0/RA8876.cpp index 0e36a6dde..b507912ff 100644 --- a/lib/lib_display/Xlatb_RA8876-gemu-1.0/RA8876.cpp +++ b/lib/lib_display/Xlatb_RA8876-gemu-1.0/RA8876.cpp @@ -481,6 +481,9 @@ void RA8876::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) { } bool RA8876::initDisplay() { + + lvgl_param = 10; + SPI.beginTransaction(m_spiSettings); // Set chip config register diff --git a/lib/lib_display/Xlatb_RA8876-gemu-1.0/library.properties b/lib/lib_display/Xlatb_RA8876-gemu-1.0/library.properties index 5eea15179..6e478adf0 100644 --- a/lib/lib_display/Xlatb_RA8876-gemu-1.0/library.properties +++ b/lib/lib_display/Xlatb_RA8876-gemu-1.0/library.properties @@ -1,9 +1,9 @@ name=RA8876 -version=1.0.0 -author=Jaret Burkett / Gerhard Mutz -maintainer=Gerhard Mutz -sentence=Tasmota Library for RA8876 displays -paragraph=Tasmota Library for RA8876 displays +version=1.0.2 +author=Jaret Burkett +maintainer=Jaret Burkett +sentence=Library for RA8876 displays +paragraph=Library for RA8876 displays category=Display -url=https://github.com/arendst/Tasmota +url=https://github.com/jaretburkett/ILI9488 architectures=* diff --git a/lib/libesp32_lvgl/Adafruit_LvGL_Glue-shadinger/Adafruit_LvGL_Glue.cpp b/lib/libesp32_lvgl/Adafruit_LvGL_Glue-shadinger/Adafruit_LvGL_Glue.cpp index dfabf2efa..8128bf3b8 100644 --- a/lib/libesp32_lvgl/Adafruit_LvGL_Glue-shadinger/Adafruit_LvGL_Glue.cpp +++ b/lib/libesp32_lvgl/Adafruit_LvGL_Glue-shadinger/Adafruit_LvGL_Glue.cpp @@ -29,11 +29,9 @@ uint32_t Touch_Status(uint32_t sel); static bool touchscreen_read(struct _lv_indev_drv_t *indev_drv, lv_indev_data_t *data) { //lv_coord_t last_x = 0, last_y = 0; //static uint8_t release_count = 0; -#if defined(USE_FT5206) || defined(USE_XPT2046) data->point.x = Touch_Status(1); // Last-pressed coordinates data->point.y = Touch_Status(2); data->state = Touch_Status(0); -#endif return false; /*No buffering now so no more data read*/ } diff --git a/tasmota/xdrv_13_display.ino b/tasmota/xdrv_13_display.ino index 1736e6a2c..e90eab48a 100755 --- a/tasmota/xdrv_13_display.ino +++ b/tasmota/xdrv_13_display.ino @@ -2677,14 +2677,32 @@ void AddValue(uint8_t num,float fval) { * Touch panel control \*********************************************************************************************/ -#if defined(USE_FT5206) || defined(USE_XPT2046) + bool FT5206_found = false; bool XPT2046_found = false; - int16_t touch_xp; int16_t touch_yp; bool touched; +uint32_t Touch_Status(uint32_t sel) { + if (FT5206_found || XPT2046_found) { + switch (sel) { + case 0: + return touched; + case 1: + return touch_xp; + case 2: + return touch_yp; + } + return 0; + } else { + return 0; + } +} + +#if defined(USE_FT5206) || defined(USE_XPT2046) + + #ifdef USE_M5STACK_CORE2 uint8_t tbstate[3]; #endif // USE_M5STACK_CORE2 @@ -2747,21 +2765,7 @@ int16_t XPT2046_y() { } #endif // USE_XPT2046 -uint32_t Touch_Status(uint32_t sel) { - if (FT5206_found || XPT2046_found) { - switch (sel) { - case 0: - return touched; - case 1: - return touch_xp; - case 2: - return touch_yp; - } - return 0; - } else { - return 0; - } -} + void Touch_Check(void(*rotconvert)(int16_t *x, int16_t *y)) {