Update sstv_decode_prompt.sh add auto-tune prompt option

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

@ -34,7 +34,9 @@ sudo killall -9 rtl_fm &>/dev/null
#echo "s" >> .mode
frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=220 --title="SSTV Decoding using QSSTV" --text="Choose the frequency for SSTV decoding:" --column="kHz" --column="Use" 145800 "ISS" 434900 "CubeSatSim" Other "Choose another frequency" SSTV "Test SSTV decoding with WAV file")
autotune=0
frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=220 --title="SSTV Decoding using QSSTV" --text="Choose the frequency for SSTV decoding:" --column="kHz" --column="Use" 145800 "ISS" 434900 "CubeSatSim" Auto-tune "CubeSatSim Auto-tune" Other "Choose another frequency" SSTV "Test SSTV decoding with WAV file")
echo $frequency
@ -70,6 +72,11 @@ echo
echo "If your CubeSatSim is transmitting in SSTV mode (mode 4) you should get images."
echo "Note: if you see and hear an SSTV signal but don't get any images, the CubeSatSim signal might have a frequency offset. Try rebooting the CubeSatSim to fix."
elif [ "$frequency" = "Auto-tune" ]; then
frequency=434900000
autotune=1
elif [ "$choice" = "3" ] || [ "$frequency" = "Other" ]; then
echo
@ -121,20 +128,13 @@ setsid qsstv &
sleep 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
threshold="1"
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo -n "Auto tune confidence: "
echo $confidence
if [ "$confidence" -le "$threshold" ]; then
sleep 10
if [ "$autotune" = "1" ]; then
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
threshold="1"
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo -n "Auto tune confidence: "
echo $confidence
@ -147,17 +147,28 @@ if [ "$confidence" -le "$threshold" ]; then
confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo -n "Auto tune confidence: "
echo $confidence
if [ "$confidence" -le "$threshold" ]; then
sleep 10
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 -n "Auto tune confidence: "
echo $confidence
fi
fi
fi
if [ "$confidence" -gt "$threshold" ]; then
frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo -n "Auto tune frequency: "
echo $frequency
else
echo "Auto tune failed, frequency unchanged"
if [ "$confidence" -gt "$threshold" ]; then
frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt)
echo -n "Auto tune frequency: "
echo $frequency
else
echo "Auto tune failed, frequency unchanged"
fi
echo
fi
echo
#sudo systemctl restart cubesatsim

Loading…
Cancel
Save

Powered by TurnKey Linux.