Update config

send-commands
Alan Johnston 1 month ago committed by GitHub
parent 8938676940
commit 5ba1927756
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,5 +1,43 @@
#!/bin/bash
function transmit_command {
FILE=/home/pi/CubeSatSim/transmit_dtmf
if [ -f "$FILE" ]; then
mode=1
cat direwolf/direwolf-transmit-dtmf.conf > direwolf-now.conf && echo 'CBEACON dest="DTMF-3" info="'$1' #" delay=0' >> direwolf-now.conf
echo "Stopping command and control"
sudo systemctl stop command
echo "Transmit DTMF start"
gpio write 28 0 # ptt
gpio write 2 1 # tx LED
timeout 3 direwolf -c direwolf-now.conf -t 0l
gpio write 2 0 # tx LED
gpio write 28 1 #ptt
echo "Transmit stop"
echo "Resuming command and control"
sudo systemctl start command
else
STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE="$1
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
echo $STRING > /home/pi/CubeSatSim/t.txt
echo
echo -n "Sending APRS packet to change mode to "$2
echo $STRING
sudo touch /home/pi/CubeSatSim/ready
sleep 3
fi
exit
}
function transmit_command_aprs {
FILE=/home/pi/CubeSatSim/transmit_dtmf
@ -432,7 +470,8 @@ elif [ "$1" = "-a" ]; then
if [ "$1" == "n" ]; then
transmit_command_aprs
# transmit_command_aprs
transmit_command "1" "a"
else

Loading…
Cancel
Save

Powered by TurnKey Linux.