mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-29 11:11:47 +01:00
#809 added touch calibration to main menu
This commit is contained in:
parent
c2aa6de0cf
commit
5a099e87fa
@ -54,6 +54,10 @@ if [ "${runBehindTor}" == "on" ]; then
|
||||
OPTIONS+=(TOR "Tor Service options")
|
||||
fi
|
||||
|
||||
if [ "${touchscreen}" == "1" ]; then
|
||||
OPTIONS+=(SCREEN "Touchscreen Calibration")
|
||||
fi
|
||||
|
||||
# dont offer lnbalance/lnchannels on testnet
|
||||
if [ "${chain}" = "main" ]; then
|
||||
OPTIONS+=(lnbalance "Detailed Wallet Balances" \
|
||||
@ -115,6 +119,10 @@ case $CHOICE in
|
||||
./00torMenu.sh
|
||||
./00mainMenu.sh
|
||||
;;
|
||||
SCREEN)
|
||||
dialog --title 'Touchscreen Calibration' --msgbox 'Choose OK and then follow the instructions on touchscreen for calibration.\n\nBest is to use a stylus for accurate touchscreen interaction.' 9 48
|
||||
/home/admin/config.scripts/blitz.touchscreen calibrate
|
||||
;;
|
||||
lnchannels)
|
||||
lnchannels ${network}
|
||||
echo "Press ENTER to return to main menu."
|
||||
|
@ -145,8 +145,15 @@ fi
|
||||
|
||||
if [ "$1" = "calibrate" ]; then
|
||||
|
||||
# check that touchscreen is on
|
||||
if [ "${touchscreen}" == "1" ]; then
|
||||
echo "# calibrating touchscreen ..."
|
||||
echo "error='not installed'"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# run calibrate screen
|
||||
echo "# calibrating touchscreen ..."
|
||||
sudo rm /tmp/99-calibration.conf 2>/dev/null
|
||||
sudo -u pi DISPLAY=:0.0 xinput_calibrator --output-filename /tmp/99-calibration.conf
|
||||
|
||||
@ -169,7 +176,7 @@ if [ "$1" = "calibrate" ]; then
|
||||
sleep 3
|
||||
sudo init 5
|
||||
fi
|
||||
|
||||
|
||||
echo "# OK done"
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user