You are reading a single comment by @user141569 and its replies. Click here to read the full conversation.
176 / 160 = 1.1 exactly.
So every 1.1 units of LCD display, is roughly 1 touch pixel. The touch callback is returning LCD pixels, not touch pixels because it wants to abstract that away, its mostly irrelevant.
the callback fires, converts the touch pixel into LCD pixels, and gives you that, so you can work with LCD pixels without converting.
Espruino code uses 160x160 from digging around, mb thats a close estimate of what you should be using?
LCD_WIDTH / 160
LCD_HEIGHT / 160
So these values would be your 'unit chunks' for touch grid size. So its like 0-160, is multiplies that number by
LCD_HEIGHT/160to get the amount in 'pixels', and it stores as int, so its naturally
math.floorrounded 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.