Browse Source

add lcdrotate to raspiblitz.conf

v1.3
Christian Rotzoll 6 years ago
parent
commit
c6a509af73
  1. 8
      home.admin/config.scripts/blitz.lcdrotate.sh

8
home.admin/config.scripts/blitz.lcdrotate.sh

@ -18,7 +18,14 @@ fi
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo "Turn ON: LCD ROTATE"
# add default 'lcdrotate' raspiblitz.conf if needed
if [ ${#lcdrotate} -eq 0 ]; then
echo "lcdrotate=0" >> /mnt/hdd/raspiblitz.conf
fi
sudo sed -i "s/^dtoverlay=.*/dtoverlay=tft35a:rotate=90/g" /boot/config.txt
sudo sed -i "s/^lcdrotate=.*/lcdrotate=1/g" /mnt/hdd/raspiblitz.conf
echo "OK - a restart is needed: sudo shutdown -r now"
fi
@ -31,6 +38,7 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
echo "Turn OFF: LCD ROTATE"
sudo sed -i "s/^dtoverlay=.*/dtoverlay=tft35a:rotate=270/g" /boot/config.txt
sudo sed -i "s/^lcdrotate=.*/lcdrotate=0/g" /mnt/hdd/raspiblitz.conf
echo "OK - a restart is needed: sudo shutdown -r now"
fi

Loading…
Cancel
Save