From 8b5796fd78229ac34c6cfaca69fe4a4bbf87ec34 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 13 Jul 2024 13:01:05 -0400 Subject: [PATCH] Update config change_command using dtmf or APRS --- config | 52 +++++++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/config b/config index ea5ef4da..8f385a99 100755 --- a/config +++ b/config @@ -1106,31 +1106,37 @@ fi function transmit_command_aprs { - echo "Mode 1 is APRS" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" - sudo rm /home/pi/CubeSatSim/t.txt - echo $STRING > /home/pi/CubeSatSim/t.txt - echo - echo -n "Sending APRS packet " - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 5 - sudo touch /home/pi/CubeSatSim/ready - - sleep 5 - echo "Stopping command and control" - sudo systemctl stop command + FILE=/home/pi/CubeSatSim/transmit_dtmf + if [ -f "$FILE" ]; then + + echo "Stopping command and control" + sudo systemctl stop command + + echo "Transmit start" + gpio write 28 0 # ptt + gpio write 27 1 # tx LED + timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-aprs.conf + gpio write 27 0 # tx LED + gpio write 28 1 #ptt + echo "Transmit stop" + + echo "Resuming command and control" + sudo systemctl start command + + else - echo "Transmit start" - gpio write 28 0 # ptt - gpio write 27 1 # tx LED - timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-aprs.conf - gpio write 27 0 # tx LED - gpio write 28 1 #ptt - echo "Transmit stop" + STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" + sudo rm /home/pi/CubeSatSim/t.txt + echo $STRING > /home/pi/CubeSatSim/t.txt + echo + echo -n "Sending APRS packet to change mode to APRS" + echo $STRING + sudo touch /home/pi/CubeSatSim/ready + sleep 5 + sudo touch /home/pi/CubeSatSim/ready + sleep 5 - echo "Resuming command and control" - sudo systemctl start command + fi exit }