-
What firmware version do you have?
Firmware 2v12, Boot v0.43.
The touchscreen stretches past the edge of the LCD, so to ensure touches actually align with the pixels the coordinates have to go past the edge of the screen (sometimes even negative) if you press somewhere past the edge of the screen.
Through experimentation, the lowest coordinate I can get in the top left is (5, 9) and the highest coordinate I can get in the bottom right is (191, 185). I can still get values in the 180s if I tap quite solidly on the screen, with my entire finger within the screen area.
On 'cutting edge' builds (and 2v13 when released) the touch coordinates will now be clipped to the screen coordinates (0..175) even if you tap outside
Does this mean areas still on the screen outside of this range will become unreachable?
I wouldn't rely on any particular value for its size
Is this because it could be different on every watch? If I can't rely on the touch resolution being a certain size, that means I can't rely on the coordinates to correspond to the pixels the user pressed. In that case, if I have multiple on-screen buttons, how am I supposed to tell which one the user pressed?
http://www.espruino.com/Reference is the best source of info. But if you think something is missing please let me know where and what you expect to find and I can fix it.
In https://www.espruino.com/Reference#l_BanĀgle_touch, it states that
xy
is an "Object of form{x,y}
containing touch coordinates (if the device supports full touch)". If there was a quirk like this, I'd expect it to be mentioned here. (Additionally, I don't think this explains what happens on Bangle.js 1, a device which doesn't have full touch, though that's less important to me because I don't have a Bangle 1.) -
I am currently developing an app for my new bangle.js 2. While attempting to troubleshoot some buggy behavior in my app, I noticed that the root cause was that I was expecting the values reported by Bangle.on("touch") to align with the pixels on the screen, meaning that both the X and Y coordinate would be somewhere between 0 and 175 because the screen is 176x176. However, this is not the case, so I was experiencing bugs. When tapping the bottom right corner of the screen, I am able to reach as high as (191, 184). This seems to imply that the touch resolution is 192x192. Is this correct? And if so, where can I find this documented?
Very good to know. Through experimentation, I've found that touch works OK if I clip it manually to be within 0..176. It's necessary to tap the center of the buttons, and difficult to distinguish anything much smaller than my buttons, but it works. If I get annoyed, maybe I'll try 160x160.