add on air switch
This commit is contained in:
parent
cedc70a8cf
commit
7e83dc8091
1 changed files with 11 additions and 1 deletions
10
buzzer.sh
10
buzzer.sh
|
@ -29,8 +29,18 @@ while true; do
|
|||
elif [ "$swupstat" -eq 1 ]; then
|
||||
|
||||
while [ "$swupstat" -eq 1 ]; do
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue