TouchScreen calibration
- jtrantow
- Offline
- Premium Member
Less
More
- Posts: 107
- Thank you received: 18
04 Mar 2021 20:29 #201039
by jtrantow
TouchScreen calibration was created by jtrantow
A dumpster-diving friend gave me a truckload(18) of medical computers that should make nice CNC computers. The corei3 computer isn't anything special, but the 15" touch screen LCD and rugged keyboard have a pole mount that will make for an easy machine mount.
I installed the default 2.8 .iso and added the xinput and xinput_calibrator packages for the touchscreen.
I can see my device using "xinput --list "
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ALCOR USB Multimedia Keyboard Consumer Control id=10 [slave pointer (2)]
⎜ ↳ Hampshire Company TSHARC Analog Resistive id=12 [slave pointer (2)]
Device 'Hampshire Company TSHARC Analog Resistive':
Device Enabled (147): 1
Coordinate Transformation Matrix (149): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.00000
0, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (282): 0
libinput Natural Scrolling Enabled Default (283): 0
libinput Middle Emulation Enabled (288): 0
libinput Middle Emulation Enabled Default (289): 0
libinput Calibration Matrix (290): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.00000
0, 0.000000, 0.000000, 1.000000
libinput Calibration Matrix Default (291): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000,
0.000000, 0.000000, 0.000000, 1.000000
libinput Left Handed Enabled (292): 0
libinput Left Handed Enabled Default (293): 0
libinput Send Events Modes Available (267): 1, 0
libinput Send Events Mode Enabled (268): 0, 0
libinput Send Events Mode Enabled Default (269): 0, 0
Device Node (270): "/dev/input/event7"
Device Product ID (271): 2013, 1
libinput Drag Lock Buttons (284): <no items>
libinput Horizontal Scroll Enabled (285): 1
But when I try to use it, the touches are flipped on a diagonal. (XY swapped, XY inverted???)
After I run xinput_calibrator, I have:
jjt@debian:~$ sudo more /etc/X11/xorg.conf.d/99-calibration.conf
Section "InputClass"
Identifier "calibration"
MatchProduct "Hampshire Company TSHARC Analog Resistive"
Option "MinX" "117"
Option "MaxX" "65482"
Option "MinY" "64"
Option "MaxY" "65428"
Option "SwapXY" "0" # unless it was already set to 1
Option "InvertX" "0" # unless it was already set
Option "InvertY" "0" # unless it was already set
EndSection
But no matter what I set for SwapXY, InvertX, InvertY, my touches are flipped on the diagonal. (top right and bottom left are ok but everything else is flipped about the diagonal. I also tried saving this info to /usr/share/X11... with no success.
I figured out how to swap XY using "xinput set-float-props 12 149 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0" but XY are still inverted.
Any insight into why my xinput-calibrator file isn't working would be appreciated.
Alternative would be help using xinput to invert x and y.
I installed the default 2.8 .iso and added the xinput and xinput_calibrator packages for the touchscreen.
I can see my device using "xinput --list "
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ALCOR USB Multimedia Keyboard Consumer Control id=10 [slave pointer (2)]
⎜ ↳ Hampshire Company TSHARC Analog Resistive id=12 [slave pointer (2)]
Device 'Hampshire Company TSHARC Analog Resistive':
Device Enabled (147): 1
Coordinate Transformation Matrix (149): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.00000
0, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (282): 0
libinput Natural Scrolling Enabled Default (283): 0
libinput Middle Emulation Enabled (288): 0
libinput Middle Emulation Enabled Default (289): 0
libinput Calibration Matrix (290): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.00000
0, 0.000000, 0.000000, 1.000000
libinput Calibration Matrix Default (291): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000,
0.000000, 0.000000, 0.000000, 1.000000
libinput Left Handed Enabled (292): 0
libinput Left Handed Enabled Default (293): 0
libinput Send Events Modes Available (267): 1, 0
libinput Send Events Mode Enabled (268): 0, 0
libinput Send Events Mode Enabled Default (269): 0, 0
Device Node (270): "/dev/input/event7"
Device Product ID (271): 2013, 1
libinput Drag Lock Buttons (284): <no items>
libinput Horizontal Scroll Enabled (285): 1
But when I try to use it, the touches are flipped on a diagonal. (XY swapped, XY inverted???)
After I run xinput_calibrator, I have:
jjt@debian:~$ sudo more /etc/X11/xorg.conf.d/99-calibration.conf
Section "InputClass"
Identifier "calibration"
MatchProduct "Hampshire Company TSHARC Analog Resistive"
Option "MinX" "117"
Option "MaxX" "65482"
Option "MinY" "64"
Option "MaxY" "65428"
Option "SwapXY" "0" # unless it was already set to 1
Option "InvertX" "0" # unless it was already set
Option "InvertY" "0" # unless it was already set
EndSection
But no matter what I set for SwapXY, InvertX, InvertY, my touches are flipped on the diagonal. (top right and bottom left are ok but everything else is flipped about the diagonal. I also tried saving this info to /usr/share/X11... with no success.
I figured out how to swap XY using "xinput set-float-props 12 149 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0" but XY are still inverted.
Any insight into why my xinput-calibrator file isn't working would be appreciated.
Alternative would be help using xinput to invert x and y.
Attachments:
Please Log in or Create an account to join the conversation.
- jtrantow
- Offline
- Premium Member
Less
More
- Posts: 107
- Thank you received: 18
04 Mar 2021 23:40 #201070
by jtrantow
Replied by jtrantow on topic TouchScreen calibration
I got the touchscreen working, but what a holy mess!
Eventually, installed evdev package and was able to get it working.
Originally, linux was using libinput and I couldn't get the axes swapped using libinput. (still not sure why it didn't work)
Eventually, installed evdev package and was able to get it working.
Originally, linux was using libinput and I couldn't get the axes swapped using libinput. (still not sure why it didn't work)
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
Less
More
- Posts: 1150
- Thank you received: 184
06 Mar 2021 15:39 #201193
by Mike_Eitel
Replied by Mike_Eitel on topic TouchScreen calibration
Yes, had the same problem when lcnc started using buster.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23546
- Thank you received: 4854
07 Mar 2021 01:43 - 07 Mar 2021 01:45 #201247
by andypugh
My development PC is a Core i3. It has rather good latency.
Replied by andypugh on topic TouchScreen calibration
A dumpster-diving friend gave me a truckload(18) of medical computers that should make nice CNC computers. The corei3 computer isn't anything special,
My development PC is a Core i3. It has rather good latency.
Attachments:
Last edit: 07 Mar 2021 01:45 by andypugh.
Please Log in or Create an account to join the conversation.
Time to create page: 0.089 seconds