diff --git a/Platformio/hardware/ESP32/boardtest/main_boardtest.cpp b/Platformio/hardware/ESP32/boardtest/main_boardtest.cpp index 3ac83db7..869d82fd 100644 --- a/Platformio/hardware/ESP32/boardtest/main_boardtest.cpp +++ b/Platformio/hardware/ESP32/boardtest/main_boardtest.cpp @@ -112,6 +112,10 @@ class LGFX : public lgfx::LGFX_Device cfg.pin_sda = SDA; cfg.pin_scl = SCL; cfg.freq = 400000; + cfg.x_min = 0; + cfg.x_max = screenWidth-1; + cfg.y_min = 0; + cfg.y_max = screenHeight-1; _touch_instance.config(cfg); _panel_instance.setTouch(&_touch_instance); } diff --git a/Platformio/hardware/ESP32/tft_hal_esp32.cpp b/Platformio/hardware/ESP32/tft_hal_esp32.cpp index e275f4f4..c2fe7c3e 100644 --- a/Platformio/hardware/ESP32/tft_hal_esp32.cpp +++ b/Platformio/hardware/ESP32/tft_hal_esp32.cpp @@ -44,6 +44,10 @@ LGFX::LGFX(void) { cfg.pin_sda = SDA_GPIO; cfg.pin_scl = SCL_GPIO; cfg.freq = 400000; + cfg.x_min = 0; + cfg.x_max = SCR_WIDTH-1; + cfg.y_min = 0; + cfg.y_max = SCR_HEIGHT-1; _touch_instance.config(cfg); _panel_instance.setTouch(&_touch_instance); }