#646 rotate touchscreen

This commit is contained in:
Christian Rotzoll 2019-09-03 15:23:02 +02:00
parent 04ad643ed0
commit ce6e58b5e6
2 changed files with 23 additions and 2 deletions

View file

@ -101,7 +101,7 @@ SHA-256: d62dad4c93b581153554bd02ce7566d37c0d9fd213a7865bc11deb5fe3115b13
if you need details, see here: https://www.raspberrypi.org/documentation/installation/installing-images/README.md
* [How to update my RaspiBlitz?](FAQ.md#how-to-update-my-raspiblitz-after-version-098)
* [How to update my RaspiBlitz?](FAQ.md#how-to-update-my-raspiblitz-from-v12)
* [Whats new in Version 1.3 of RaspiBlitz?](FAQ.md#whats-new-in-version-13-of-raspiblitz)
## Boot your RaspiBlitz
@ -144,7 +144,9 @@ If you run into a problem or you have still a question, follow the steps below t
4. Check the RaspiBlot Troubleshoort guide: https://stadicus.github.io/RaspiBolt/raspibolt_70_troubleshooting.html (RaspiBolt is very similar to the RaspiBlitz)
5. If you havent found an answere yet, open a new issue on the RaspiBlitz GitHub. You may have to register an account with GitHub for this. If its a bug with the RaspiBlitz, please add (copy+paste) a Debug Report to your issue (see [FAQ](FAQ.md) how to generate) and/or add some screenshots/photos so the community gets more insight into your problem.
5. There is a Telegram Group of RaspiBlitz users helping each other: https://t.me/raspiblitz
6. If you havent found an answere yet, open a new issue on the RaspiBlitz GitHub. You may have to register an account with GitHub for this. If its a bug with the RaspiBlitz, please add (copy+paste) a Debug Report to your issue (see [FAQ](FAQ.md) how to generate) and/or add some screenshots/photos so the community gets more insight into your problem.
## Setup Process (Detailed Documentation)

View file

@ -58,6 +58,22 @@ EOF
# Remove 00infoLCD.sh from .bashrc of pi user
sudo sed -i s'/exec $SCRIPT/#exec $SCRIPT/' /home/pi/.bashrc
# rotate touchscreen based on if LCD is rotated
if [ "${lcdrotate}" = "1" ]; then
echo "LCD is rotated into default - no touchscreen rotate"
else
echo "Activate Touchscreen Rotate"
cat << EOF | sudo tee /etc/X11/xorg.conf.d/40-libinput.conf >/dev/null
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
EOF
fi
# mark touchscreen as switched ON in config
if [ ${#touchscreen} -eq 0 ]; then
echo "touchscreen=0" >> /mnt/hdd/raspiblitz.conf
@ -93,6 +109,9 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
# remove old pi autostart
sudo rm /home/pi/autostart.sh
# delete possible touchscreen rotate
sudo rm /etc/X11/xorg.conf.d/40-libinput.conf >/dev/null
# mark touchscreen as switched OFF in config
sudo sed -i "s/^touchscreen=.*/touchscreen=0/g" /mnt/hdd/raspiblitz.conf