some optimations and bugfixes

This commit is contained in:
Martin Selbmann 2020-09-22 19:31:15 +02:00
parent 94494bda8e
commit 61839d5e34
1 changed files with 2 additions and 7 deletions

View File

@ -23,13 +23,6 @@ cmdonairstat=0
while true; do
if [ "$cmdonairstat" -eq 1 ]; then
cmdonairstat=0
$(command -v pkill) "$pgrepplayer"
fi
buzzerstat="$($cmdgpio read $buzzgpio)"
swupstat="$($cmdgpio read $swupgpio)"
@ -59,6 +52,8 @@ while true; do
done
echo "Off air!"
cmdonairstat=0
$(command -v pkill) "$pgrepplayer"
elif [ "$buzzerstat" -eq 1 ] && [ "$swupstat" -eq 0 ]; then
sleep 0.1