Skip to content

Instantly share code, notes, and snippets.

@neaxi
Created January 1, 2020 11:22
Show Gist options
  • Save neaxi/9425f1b5ff99eacfba08fa9ce70f1544 to your computer and use it in GitHub Desktop.
Save neaxi/9425f1b5ff99eacfba08fa9ce70f1544 to your computer and use it in GitHub Desktop.
Touch UI display rotation
0. SOURCES
https://github.com/BillyBlaze/OctoPrint-TouchUI/wiki/Setup:-Troubleshooting#calibration
https://wiki.ubuntu.com/X/InputCoordinateTransformation
1. SET DISPLAY ROTATION
$ cat /boot/config.txt
display_rotate=3
2. TOUCHSCREEN ROTATION
$ cat ~/TouchUI-autostart/calibration.sh
su $TOUCHUI_USER -c "xinput set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1"
3. CALIBRATION
$ sudo service touchui stop
$ sudo xinit ~/TouchUI-autostart/helpers/calibration.xinit
$ cat /usr/share/X11/xorg.conf.d/99-calibration.conf
Section "InputClass"
Identifier "calibration"
MatchProduct "FT5406 memory based driver"
Option "MinX" "53862"
Option "MaxX" "54954"
Option "MinY" "19565"
Option "MaxY" "20330"
Option "SwapXY" "1" # unless it was already set to 1
Option "InvertX" "0" # unless it was already set
Option "InvertY" "0" # unless it was already set
EndSection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment