Modern libinput uses an Affine Transformation Matrix. To map a raw touch coordinate
To perform the conversion, you need the following values from xinput_calibrator:
- MinX, MaxX: The horizontal raw range.
- MinY, MaxY: The vertical raw range.
-
Screen Resolution: Optional, but
$65535$ is the standard normalized range for X11.
Note: Use
$1.0$ if the target is normalized, or$65535$ for raw X11.
If the screen is rotated 90° or 270°, the
Based on the ADS7846 data:
- MinX: 3982, MaxX: 62782
- MinY: 62821, MaxY: 3430
| Variable | Calculation | Result |
|---|---|---|
| 58800 | ||
| -59391 | ||
| Scale X ( |
|
1.1145 |
| Scale Y ( |
|
-1.1034 |
| Offset X ( |
-0.0677 | |
| Offset Y ( |
1.0577 |
"1.1145 0 -0.0677 0 -1.1034 1.0577 0 0 1"
When generating these matrices, verify the following:
-
Inversion Check: If
$MinY > MaxY$ , the$e$ value must be negative and the$f$ offset will usually be$> 1$ . - Precision: Provide at least 4 decimal places for accuracy on small (3.5") screens.
-
Driver Specifics:
- Remind the user that libinput configuration must be placed in
/etc/X11/xorg.conf.d/. - The evdev driver must be uninstalled to prevent property overrides.
- Remind the user that libinput configuration must be placed in