forked from Openvario/meta-openvario
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supports calibration in all 4 directions. Screen rotation is implemented using LIBINPUT_CALIBRATION_MATRIX property instead of tslib because tslib rotation is buggy see Openvario#17 (comment)
- Loading branch information
Showing
6 changed files
with
31 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
ROT=`cat /sys/class/graphics/fbcon/rotate` | ||
|
||
# Perform the calibration | ||
TSLIB_TSDEVICE=/dev/input/touchscreen0 ts_calibrate -r $ROT | ||
|
||
echo "Applying the libinput calibration matrix according to current rotation ($ROT)" | ||
case $ROT in | ||
0) ROTMATRIX="1 0 0 0 1 0" ;; | ||
1) ROTMATRIX="0 1 0 -1 0 1" ;; | ||
2) ROTMATRIX="-1 0 1 0 -1 1" ;; | ||
3) ROTMATRIX="0 -1 1 1 0 0" ;; | ||
esac | ||
|
||
echo "ENV{LIBINPUT_CALIBRATION_MATRIX}=\"$ROTMATRIX\"" > /etc/udev/rules.d/libinput-ts.rules | ||
udevadm control --reload | ||
udevadm trigger | ||
|
||
echo Restart ts_uinput | ||
systemctl restart ts_uinput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters