Update command to check for USB sound card, exit if C&C off

pull/323/head
Alan Johnston 1 year ago committed by GitHub
parent 5b7ebaf077
commit a6736af1cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,28 +5,36 @@ echo -e "\nCommand and Control script for CubeSatSim v1.3.2\n"
FILE=/home/pi/CubeSatSim/command_control FILE=/home/pi/CubeSatSim/command_control
if [ -f "$FILE" ]; then if [ -f "$FILE" ]; then
echo "Radio command and control is ON" echo "Radio command and control is ON"
echo "Turning Command and control to OFF" # echo "Turning Command and control to OFF"
sudo rm /home/pi/CubeSatSim/command_control # sudo rm /home/pi/CubeSatSim/command_control
echo "rebooting" # echo "rebooting"
sudo systemctl stop rpitx # sudo systemctl stop rpitx
sudo reboot now # sudo reboot now
# fi # fi
else else
echo "Radio command and control is OFF" echo "Radio command and control is OFF"
exit 1
fi fi
echo "Starting direwolf"
if [ "$1" = "d" ]; then # if [[ $(grep 'dtparam=audio=on' /boot/config.txt) ]]; then
if [[ $(arecord -l | grep card) ]]; then
echo "debug mode" echo "Starting direwolf"
direwolf -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/aprs_in.py d
if [ "$1" = "d" ]; then
echo "debug mode"
direwolf -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/aprs_in.py d
else
direwolf -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/aprs_in.py
fi
else else
echo "Starting squelch C&C"
direwolf -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/aprs_in.py
fi fi

Loading…
Cancel
Save

Powered by TurnKey Linux.