add on air switch

This commit is contained in:
Martin Selbmann 2020-09-19 20:18:17 +02:00
parent cedc70a8cf
commit 7e83dc8091
1 changed files with 11 additions and 1 deletions

View File

@ -29,8 +29,18 @@ while true; do
elif [ "$swupstat" -eq 1 ]; then
while [ "$swupstat" -eq 1 ]; do
echo "On air!"
if [ "$cmdonairstat" -eq 0 ]; then
echo "On air!"
cmdonairstat=1
elif [ "$swupstat" -eq 0 ]; then
cmdonairstat=0
fi
swupstat="$($cmdgpio read $swupgpio)"
sleep 0.1
done