From 3d8b5a05672ef3985a23e7aff7522c091573fe17 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:42:50 -0400 Subject: [PATCH] Update sstv_decode_prompt.sh add autotune --- groundstation/sstv_decode_prompt.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index dab0f18a..86011979 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -121,8 +121,25 @@ setsid qsstv & sleep 5 -#sudo systemctl restart cubesatsim +python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt + +threshold="0.1" +confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) +echo "Auto tune confidence: " +echo $confidence +if [ "$confidence" .lt "$threshold" ]; then + + sleep 10 + python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt + +fi +frequency=$(awk '{print $1}' auto-tune.txt) + +echo "Auto tune frequency: " +echo $frequency + +#sudo systemctl restart cubesatsim value=`aplay -l | grep "Loopback"` echo "$value" > /dev/null