Update AutomaticBrightness.sh

improved comparison
This commit is contained in:
steel99xl 2023-10-07 14:40:48 -04:00 committed by GitHub
parent 2edaa5c922
commit a9d935789c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,11 +42,7 @@ else
$(echo $OffSet > /tmp/AB.offset)
fi
if [[ $OffSet -lt 0 ]]
then
OffSet=0
fi
OffSet=$((OffSet < 0 ? 0 : OffSet))
if [[ $op -lt 2 ]]
@ -58,10 +54,7 @@ then
OffSet=$((OffSet - num))
fi
if [[ $OffSet -lt 0 ]]
then
OffSet=0
fi
OffSet=$((OffSet < 0 ? 0 : OffSet))
$(echo $OffSet > /tmp/AB.offset)