I dont have a Bangle v2, but out of curiosity, how does the touch callback fire? If you touch screen does it fire for each touchPixel that is touched, because I would imagine the finger hits multiple co-ordinates. Or does it just fire once? Or does the callback return a list of co-ordinates? If it fires just once, then how does it choose which touchPixel out of the possible ones that it touched, hm, does it take the center? Averge of them all, mb.
I might check this out in code.
Edit: looked at the code, its very automatically done by the touch controller device. Command is sent to it, and then read from it, and it returns a value from 0-160. So its handled by it, assuming it uses some sort of averaging to find center pixel.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I dont have a Bangle v2, but out of curiosity, how does the touch callback fire? If you touch screen does it fire for each touchPixel that is touched, because I would imagine the finger hits multiple co-ordinates. Or does it just fire once? Or does the callback return a list of co-ordinates? If it fires just once, then how does it choose which touchPixel out of the possible ones that it touched, hm, does it take the center? Averge of them all, mb.
I might check this out in code.
Edit: looked at the code, its very automatically done by the touch controller device. Command is sent to it, and then read from it, and it returns a value from 0-160. So its handled by it, assuming it uses some sort of averaging to find center pixel.