-
Espruino code uses 160x160 from digging around, mb thats a close estimate of what you should be using?
LCD_WIDTH / 160
and
LCD_HEIGHT / 160
So these values would be your 'unit chunks' for touch grid size. So its like 0-160, is multiplies that number byLCD_HEIGHT/160
to get the amount in 'pixels', and it stores as int, so its naturallymath.floor
rounded down to its integer.But the main bottleneck concern, surely is whether your fat finger can touch that little pixels? The minimum size should be what your finger can hit and its location will not matter because the unitSize is small enough in relation to the 'fingerSize' that it won't matter.
Firmware 2v12, Boot v0.43.
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.
Does this mean areas still on the screen outside of this range will become unreachable?
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?
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.)