Skip to content

Commit

Permalink
readsb-gain: auto now a valid setting
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Nov 2, 2024
1 parent b665ce4 commit 4dc3f98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readsb-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ systemctl restart readsb || true
mkdir -p /usr/local/bin
cat >/usr/local/bin/readsb-gain <<"EOF"
#!/bin/bash
validre='^(-10|[0-9]+([.][0-9]+)?)$'
validre='^(auto|-10|[0-9]+([.][0-9]+)?)$'
gain=$(echo $1 | tr -cd '[:digit:].-')
if ! [[ $gain =~ $validre ]] ; then echo "Error, invalid gain!"; exit 1; fi
if ! grep gain /etc/default/readsb &>/dev/null; then sudo sed -i -e 's/RECEIVER_OPTIONS="/RECEIVER_OPTIONS="--gain 49.6 /' /etc/default/readsb; fi
Expand Down

0 comments on commit 4dc3f98

Please sign in to comment.