diff --git a/lib/libesp32_epdiy/src/epd4in7.cpp b/lib/libesp32_epdiy/src/epd4in7.cpp index 4f041b473..9f0e44e86 100644 --- a/lib/libesp32_epdiy/src/epd4in7.cpp +++ b/lib/libesp32_epdiy/src/epd4in7.cpp @@ -42,7 +42,7 @@ #define WAVEFORM EPD_BUILTIN_WAVEFORM -extern uint8_t *buffer; +uint8_t *epd47_buffer; int temperature = 25; @@ -60,7 +60,7 @@ Epd47::Epd47(int16_t dwidth, int16_t dheight) : Renderer(dwidth, dheight) { int32_t Epd47::Init(void) { epd_init(EPD_LUT_1K); hl = epd_hl_init(WAVEFORM); - buffer = epd_hl_get_framebuffer(&hl); + epd47_buffer = epd_hl_get_framebuffer(&hl); return 0; } @@ -106,7 +106,7 @@ void Epd47::Updateframe() { void Epd47::fillScreen(uint16_t color) { color &= 0xf; uint8_t icol = (color << 4) | color; - memset(buffer, icol, width * height / 2); + memset(epd47_buffer, icol, width * height / 2); } #define _swap(a, b) { uint16_t t = a; a = b; b = t; } @@ -134,7 +134,7 @@ uint8_t *buf_ptr; if (xp >= width) return; if (yp >= height) return; - buf_ptr = &buffer[yp * width / 2 + xp / 2]; + buf_ptr = &epd47_buffer[yp * width / 2 + xp / 2]; if (xp % 2) { *buf_ptr = (*buf_ptr & 0x0F) | (color << 4); diff --git a/tasmota/xdsp_04_ili9341.ino b/tasmota/xdsp_04_ili9341.ino index 5401855dd..73d6c183e 100644 --- a/tasmota/xdsp_04_ili9341.ino +++ b/tasmota/xdsp_04_ili9341.ino @@ -217,12 +217,16 @@ ili9342_ctouch_counter++; if (2 == ili9342_ctouch_counter) { // every 100 ms should be enough ili9342_ctouch_counter = 0; +#ifdef USE_FT5206 if (FT5206_found) { Touch_Check(FT5206_TS_RotConvert); } +#endif // USE_FT5206 +#ifdef USE_XPT2046 if (XPT2046_found) { Touch_Check(XPT2046_TS_RotConvert); } +#endif // USE_XPT2046 } } #endif // USE_TOUCH_BUTTONS