ImpulseAdventure / GUIslice

GUIslice drag & drop embedded GUI in C for touchscreen TFT on Arduino, Raspberry Pi, ARM, ESP8266 / ESP32 / M5stack using Adafruit-GFX / TFT_eSPI / UTFT / SDL
https://www.impulseadventure.com/elec/guislice-gui.html
MIT License
1.19k stars 211 forks source link

Fix random phantom touches #308

Closed kinafu closed 3 years ago

kinafu commented 3 years ago

There's an error in the parameters passed to the TFT_eSPI_validTouch function which results in some invalid ("phantom") touches if one sets ADATOUCH_PRESS_MIN > 20.

The treshold parameter was set to 20 instead of the ADATOUCH_PRESS_MIN value, which may be set by the user and has default values set to e.g. 200.

ImpulseAdventure commented 3 years ago

Thanks for catching this @kinafu !