mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-07-28 13:53:32 +02:00
#809 added touch calibration to main menu
This commit is contained in:
@@ -54,6 +54,10 @@ if [ "${runBehindTor}" == "on" ]; then
|
|||||||
OPTIONS+=(TOR "Tor Service options")
|
OPTIONS+=(TOR "Tor Service options")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${touchscreen}" == "1" ]; then
|
||||||
|
OPTIONS+=(SCREEN "Touchscreen Calibration")
|
||||||
|
fi
|
||||||
|
|
||||||
# dont offer lnbalance/lnchannels on testnet
|
# dont offer lnbalance/lnchannels on testnet
|
||||||
if [ "${chain}" = "main" ]; then
|
if [ "${chain}" = "main" ]; then
|
||||||
OPTIONS+=(lnbalance "Detailed Wallet Balances" \
|
OPTIONS+=(lnbalance "Detailed Wallet Balances" \
|
||||||
@@ -115,6 +119,10 @@ case $CHOICE in
|
|||||||
./00torMenu.sh
|
./00torMenu.sh
|
||||||
./00mainMenu.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)
|
||||||
lnchannels ${network}
|
lnchannels ${network}
|
||||||
echo "Press ENTER to return to main menu."
|
echo "Press ENTER to return to main menu."
|
||||||
|
@@ -145,8 +145,15 @@ fi
|
|||||||
|
|
||||||
if [ "$1" = "calibrate" ]; then
|
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
|
# run calibrate screen
|
||||||
echo "# calibrating touchscreen ..."
|
|
||||||
sudo rm /tmp/99-calibration.conf 2>/dev/null
|
sudo rm /tmp/99-calibration.conf 2>/dev/null
|
||||||
sudo -u pi DISPLAY=:0.0 xinput_calibrator --output-filename /tmp/99-calibration.conf
|
sudo -u pi DISPLAY=:0.0 xinput_calibrator --output-filename /tmp/99-calibration.conf
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user