-
Notifications
You must be signed in to change notification settings - Fork 5
Implement onDetect for Zephyr port. #16
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
Conversation
4170005
to
270cde5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iabdalkader testing this on my giga i'm getting weird values regarding the number of touch points. Even if I touch the display in one single point, the sketch reports 5 contacs. I've fixed this adding memset(_points, 0, sizeof(_points));
in the begin function.
this is not true... I'm still having the issue. |
The instance should be in BSS so it should be zero'd. Is this polling or IRQ mode? In IRQ mode you get all points, with pressed set to 1 for touch. It's this way so we don't have to allocate a temporary stack buffer in the callback handler. |
I was testing IRQ mode. Yes now i get it, the number of points is fixed here. Using the same sketch with mbed you get the real number of contacts not the maximum value. |
I know. We can make it work the same way, but since the mbed port is probably going to be deprecated anyway, I wonder if there's any point in keeping the API compatible. Note the API has other problems, for example no release detection, user could pass a smaller array to |
4678f4d
to
9cb0bb4
Compare
@pennam I fixed it using another copy of points in the class. |
Signed-off-by: iabdalkader <[email protected]>
9cb0bb4
to
75bb592
Compare
Additionally, fixes race conditions in event update/reading.