From 7e83dc8091bfa5868e27899f47da56ada8514dd5 Mon Sep 17 00:00:00 2001 From: Martin Selbmann Date: Sat, 19 Sep 2020 20:18:17 +0200 Subject: [PATCH] add on air switch --- buzzer.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/buzzer.sh b/buzzer.sh index 178293c..d61f6cf 100755 --- a/buzzer.sh +++ b/buzzer.sh @@ -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