Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8015

Troubleshooting • Re: How to apply calibration matrix for touch screen based on ADS7846?

$
0
0
I found this promising Wayland utility…it reported
Kernel axis range: x [ 0..4095], y [ 0..4095]
Detected axis range: x [ 168..3879], y [ 248..3856]
while I was using it, but it crashed at the end: no such file: /sys/class/dmi/id/modalias

More reference about what's going on: https://wayland.freedesktop.org/libinpu ... anges.html

These numbers give me a starting point to calculate my matrix:

x scale (how much to amplify X)= (4095-0)/(3856-248)=1.103
y scale = (4095-0)/(3856-248) = 1.135
<calibrationMatrix>1.103 0.000 0.000 0.000 1.135 0.000</calibrationMatrix>
This rc.xml line results in a cursor that is more offset from the stylus touch... but a fixed amount (unlike how it was before calibration)

First I tried x-offset (third float parameter) -0.100 to shift the cursor to the left, and it was excessive... then I tried -0.050 and it was perfect
Then I tried y-offset -0.100 to shift the cursor up, and it was excessive. Then I tried -0.08 (because it wasn't as excessive as the x axis)
And my calibration matrix is now correct :D

<calibrationMatrix>1.103 0.000 -0.050 0.000 1.135 -0.080</calibrationMatrix>

Remember that we must disable lightdm. Then start labwc from bash, and log out each time we want to test a changed rc.xml
IMG_9503.jpeg

Statistics: Posted by robertojguerra — Mon Jul 14, 2025 1:18 am



Viewing all articles
Browse latest Browse all 8015

Trending Articles