Update sstv_decode_prompt.sh autotune while loop

fiabv4-auto-tune
Alan Johnston 2 months ago committed by GitHub
parent 9f8d7e1e1e
commit b9e3fdf2f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -129,33 +129,23 @@ setsid qsstv &
#sleep 5
if [ "$autotune" = "1" ]; then
threshold="1"
retry="5"
source /home/pi/venv/bin/activate
python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt
# echo "auto-tune.txt"
# cat /home/pi/CubeSatSim/groundstation/auto-tune.txt
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo "Auto tune confidence: " $confidence
if [ "$confidence" -le "$threshold" ]; then
sleep $retry
threshold=1
delay=5
retries=5
tries=0
confidence=0
while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do
sleep $delay
source /home/pi/venv/bin/activate
python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt
# echo "auto-tune.txt"
# cat /home/pi/CubeSatSim/groundstation/auto-tune.txt
# echo "auto-tune.txt"
# cat /home/pi/CubeSatSim/groundstation/auto-tune.txt
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo "Auto tune confidence: " $confidence
if [ "$confidence" -le "$threshold" ]; then
sleep $retry
python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt
# echo "auto-tune.txt"
# cat /home/pi/CubeSatSim/groundstation/auto-tune.txt
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo "Auto tune confidence: " $confidence
fi
fi
done
if [ "$confidence" -gt "$threshold" ]; then
frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)

Loading…
Cancel
Save

Powered by TurnKey Linux.