Touch Rotating for Waveshare LCD (Modify libinput parameters )
Note:
This method only work for some Waveshare HDMI LCD. And we here take 7inch HDMI LCD (C) as example, use Rapsbian Stretch. The supports LCD are:
7inch HDMI LCD (B)
7inch HDMI LCD (C)
7inch HDMI LCD (H)
10.1inch HDMI LCD (B)
10.1inch HDMI LCD (D)
13.3inch HDMI LCD (H)
Some one said that this method also work for 5inch HDMI LCD (B).
libinput
libinput is a library that handles input devices for display servers and other applications that need to directly deal with input devices.
The simplified software stack for a system running X.Org is:
And on the Touchscreen page we can find the Calibration matrixs:
So we could get the matrix values for clockwise (for anticlockwise, just exchange the 90 degree and 270 degree):
[0, -1, 1, 1, 0, 0, 0, 0, 1] : 90 degree
[-1, 0, 1, 0, -1, 1, 0, 0, 1]: 180 degree
[0, 1, 0, -1, 0, 1, 0, 0, 1]: 270 degree
Display Rotation
To rotate the display, you can just add the rotation statement to the config file.
Then reboot. The display will be rotated to 90 degree but the touch still the same.
display_rotate=1
#1: 90 degree
#2: 180 degree
#3: 270 degree
#1: 90 degree
#2: 180 degree
#3: 270 degree
Touch Rotation
- Install libinput
sudo apt-get install xserver-xorg-input-libinput - create an xorg.conf.d folder
sudo mkdir /etc/X11/xorg.conf.d - copy file 40-libinput-conf to the folder which we created
sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/ - Append a statement to touchscreen part of the file as below:
sudo nano /etc/X11/xorg.conf.d/40-libinput.conf
Note: According the rotation direction, you can use the corresponding values.
After setting, just reboot and the touch will rotate as well as the display.
Related Resources:
Thank you for making this article, we have so much to learn from this. Informative and knowledgeable. Meanwhile, If you are interested and looking for best Stretched LCD you may visit there. You can also check our available services to offer. Thank you and Godbless!
回复删除Very informative and impressive post you have written, this is quite interesting and i have went through it completely, an upgraded information is shared, keep sharing such valuable information. Find the best stretched lcd.
回复删除Capacitive Touch Monitors For sale
回复删除Nice Blog, Thanks for sharing.
回复删除Buy Resistive Touch Screen Online at Best Rate