From 0fecd726c9ddebb4e5fc4bfa10a62333432ddd47 Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Mon, 29 Jul 2019 00:45:35 +0200 Subject: [PATCH] #681 added to settings menu --- home.admin/00settingsMenuServices.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/home.admin/00settingsMenuServices.sh b/home.admin/00settingsMenuServices.sh index bda712e..ae1ab9a 100644 --- a/home.admin/00settingsMenuServices.sh +++ b/home.admin/00settingsMenuServices.sh @@ -14,6 +14,7 @@ if [ ${#chain} -eq 0 ]; then chain="main"; fi if [ ${#autoNatDiscovery} -eq 0 ]; then autoNatDiscovery="off"; fi if [ ${#networkUPnP} -eq 0 ]; then networkUPnP="off"; fi if [ ${#touchscreen} -eq 0 ]; then touchscreen=0; fi +if [ ${#lcdrotate} -eq 0 ]; then lcdrotate=0; fi echo "map chain to on/off" chainValue="off" @@ -53,6 +54,7 @@ CHOICES=$(dialog --title ' Additional Services ' --checklist ' use spacebar to a 5 'RTL Webinterface' ${rtlWebinterface} \ 6 'LND Auto-Unlock' ${autoUnlock} \ 9 'Touchscreen' ${tochscreenMenu} \ +r 'LCD Rotate' ${lcdrotate} \ 2>&1 >/dev/tty) else CHOICES=$(dialog --title ' Additional Services ' --checklist ' use spacebar to activate/de-activate ' 16 45 9 \ @@ -65,6 +67,7 @@ CHOICES=$(dialog --title ' Additional Services ' --checklist ' use spacebar to a 7 'BTC UPnP (AutoNAT)' ${networkUPnP} \ 8 'LND UPnP (AutoNAT)' ${autoNatDiscovery} \ 9 'Touchscreen' ${tochscreenMenu} \ +r 'LCD Rotate' ${lcdrotate} \ 2>&1 >/dev/tty) fi @@ -300,6 +303,18 @@ else echo "Touchscreen Setting unchanged." fi +# touchscreen +choice="0"; check=$(echo "${CHOICES}" | grep -c "r") +if [ ${check} -eq 1 ]; then choice="1"; fi +if [ "${touchscreen}" != "${choice}" ]; then + echo "LCD Rotate Setting changed .." + anychange=1 + sudo /home/admin/config.scripts/blitz.lcdrotate.sh ${choice} + needsReboot=1 +else + echo "Touchscreen Setting unchanged." +fi + if [ ${anychange} -eq 0 ]; then dialog --pause "Hint: Use Spacebar to check/uncheck services." 8 58 5 exit 0