Sorry for the 8-month bump, but I’m having a hard time understanding how the calibration code works; in particular all the values for sx, sy, cx, & cy confuse me.
I’m trying to use this as an example for a T43 module for which I need to correct the calibration. Can somebody explain what this code’s doing? (And should I start a new thread?)
The four parameters are a mapping essentially. NETMF starts by giving you four screen coordinates. Say your screen is 800x480. It will likely give you coordinates at (10,10); (790,10); (10, 470); (790, 470); and (400,240). You’ll note that those points are near the four corners and the center. Your program can then draw those four spots on the screen and wait for a touch to occur at each spot. This is usually done in order since you can’t rely on the uncalibrated touch points. In other words, draw a mark in the center, wait for a touch and record it, draw a mark in the corner, wait for a touch, and so on. After that process you have five touch points that correspond to the five screen coordinates. Using the above five coordinates, the touch hardware might actually report (210, 112); (1200, 113); (211, 600); (1205, 608); and (695, 360) at the spots where you touched. Those are obviously outside the range of the screen size. So, you’ll give those points and the points given to you to start back NETMF and it will then scale the reported hardware values to fit in the screen size before it reports them to you.
sx and sy are the screen coordinates and cx and cy are the points reported by the hardware during calibration.