volume control fixes

This commit is contained in:
Martin Selbmann 2020-09-23 15:39:11 +02:00
parent 174ed1aee4
commit 0e52c8d26c
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ while true; do
elif [ "$volumevalue" -eq 0 ] && [ "$swdownstat" -eq 1 ]; then
while [ "$volumevalue" -lt "$volumemax" ] || [ "$buzzerstat" -eq 0 ]; do
while [ "$volumevalue" -lt "$volumemax" ] && [ "$buzzerstat" -eq 1 ]; do
volumevalue=$((volumevalue + 1))
$cmdamixer -q -c 2 sset 'Speaker' $volumevalue%
buzzerstat="$($cmdgpio read $buzzergpio)"
@ -71,7 +71,7 @@ while true; do
elif [ "$volumevalue" -gt 0 ] && [ "$swdownstat" -eq 0 ]; then
while [ "$volumevalue" -gt 0 ] || [ "$swdownstat" -eq 1 ]; do
while [ "$volumevalue" -gt 0 ] && [ "$swdownstat" -eq 0 ]; do
volumevalue=$((volumevalue -1))
$cmdamixer -q -c 2 sset 'Speaker' $volumevalue%
swdownstat="$($cmdgpio read $swdowngpio)"