From 5ba19277567d19ffbb0c5a42b2db8a13a76cf2c2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 12:35:00 -0500 Subject: [PATCH] Update config --- config | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/config b/config index 3834838c..bcc63a15 100755 --- a/config +++ b/config @@ -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