adafruit / Adafruit_LvGL_Glue

“Glue” library between LittlevGL and Adafruit GFX (SPITFT)
Other
35 stars 14 forks source link

Debounce presses for STMPE610 #5

Open mcantureinhard opened 3 years ago

mcantureinhard commented 3 years ago

This change addresses the fact that the STMPE610 is not fast enough to keep up with continuous presses. This is mostly related to the fact that we are polling the STMPE610 and the way it operates.

The debounce is kept at 2 to minimize the lag this could generate. If this code were to get to faster MCUs it might make sense to move it to a define.

This change has been tested on a ESP32 Feather with the TFT Featherwing and lv_arduino-3.0.1 (LV_USE_USER_DATA == 1)