-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STMPE610 needs debouncing #4
Comments
nice, can you submit a PR for the fix? |
Sure, I tried to create a branch and submit the PR before creating this issue, but I seem to need write access. Could I get it, so I can push my branch and create the PR? Thanks! |
hi you would fork to your account, then submit a PR from your branch/fork |
I see, thanks for letting me know. I haven't contributed to any open source project before. Will send the PR after dinner :) |
Is there any update on adding an debounce feature? I'm having this issue currently and I still didn't find an way to get it to work |
I been having the same issue, although I have a different solution, I added a while loop inside the "if ((fifo = touch->bufferSize())) {" and then had the system delay(25); at the bottom of the loop before checking for more data. If there was more data then it ran through that too. Seems like just an extension of what was already done for the nRF. The whole loop is below... not sure which fix is more functional, just hoping one of them gets into the code soon:
#if defined(NRF52_SERIES) |
I got the esp32 feather and tft featherwing last weekend. As I was working with this library I noticed that the STMPE610 is bouncing. When pressing continuously there is always an intermediate LV_INDEV_STATE_REL returned. This results in issues with the event_handler (i.e. event LV_EVENT_RELEASED is triggered intermittently).
The fix that worked for me was to add debouncing the same way as it is implemented for the other chip, although with a lower threshold.
if ((fifo = touch->bufferSize())) { // 1 or more points await release_count = 0; ... } else { // FIFO empty release_count += (release_count < 255); if (release_count >= 2) { data->state = LV_INDEV_STATE_REL; // Is REALLY RELEASED } else { data->state = LV_INDEV_STATE_PR; // Is STILL PRESSED } }
The text was updated successfully, but these errors were encountered: