Update config added -e and -n modes

pull/327/head
Alan Johnston 1 year ago committed by GitHub
parent c7a5ac67dd
commit e9a45d93ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -35,6 +35,10 @@ if [ "$1" = "" ]; then
echo "Mode is BPSK" echo "Mode is BPSK"
elif [ "$1" = "s" ]; then elif [ "$1" = "s" ]; then
echo "Mode is SSTV" echo "Mode is SSTV"
elif [ "$1" = "e" ]; then
echo "Mode is Repeater"
elif [ "$1" = "n" ]; then
echo "Mode is Transmit Command and Control"
else else
echo echo
fi fi
@ -899,16 +903,37 @@ elif [ "$1" = "-v" ]; then
echo echo
/home/pi/CubeSatSim/telem /home/pi/CubeSatSim/telem
elif [ "$1" = "-e" ]; then
echo "changing CubeSatSim to Repeater mode"
sudo echo "e" > /home/pi/CubeSatSim/.mode
restart=1
elif [ "$1" = "-n" ]; then
echo "changing CubeSatSim to Transmit Command and Control mode"
sudo echo "n" > /home/pi/CubeSatSim/.mode
restart=1
elif [ "$1" = "-A" ]; then elif [ "$1" = "-A" ]; then
echo "Transmit APRS control packets to control another CubeSatSim" echo "Transmit APRS control packets to control another CubeSatSim"
echo echo
sudo systemctl stop cubesatsim value=`cat /home/pi/CubeSatSim/.mode`
sudo systemctl stop rpitx echo "$value" > /dev/null
# sudo rm /home/pi/CubeSatSim/t.txt set -- $value
if [ "$1" != "n" ]; then
sudo python3 -u /home/pi/CubeSatSim/rpitx.py x > /dev/null 2>&1 & # Force APRS mode sudo systemctl stop cubesatsim
sudo systemctl stop rpitx
# sudo rm /home/pi/CubeSatSim/t.txt
sudo python3 -u /home/pi/CubeSatSim/rpitx.py x > /dev/null 2>&1 & # Force APRS mode
fi
sim="y" sim="y"
@ -961,7 +986,10 @@ elif [ "$1" = "-A" ]; then
done done
sudo rm /home/pi/CubeSatSim/t.txt sudo rm /home/pi/CubeSatSim/t.txt
# sudo systemctl restart cubesatsim # sudo systemctl restart cubesatsim
reboot=1
if [ "$1" != "n" ]; then
reboot=1
elif [ "$1" = "-h" ]; then elif [ "$1" = "-h" ]; then
@ -975,6 +1003,8 @@ elif [ "$1" = "-h" ]; then
echo " -f Change to FSK/DUV mode" echo " -f Change to FSK/DUV mode"
echo " -b Change to BPSK mode" echo " -b Change to BPSK mode"
echo " -s Change to SSTV mode" echo " -s Change to SSTV mode"
echo " -n Change to Transmit Command and Control mode"
echo " -e Change to Repeater mode"
echo " -i Restart CubeSatsim software" echo " -i Restart CubeSatsim software"
echo " -c Change the CALLSIGN in the configuration file sim.cfg" echo " -c Change the CALLSIGN in the configuration file sim.cfg"
echo " -t Change the Simulated Telemetry setting in sim.cfg" echo " -t Change the Simulated Telemetry setting in sim.cfg"
@ -1022,7 +1052,7 @@ if [ "$reboot" = "1" ] ; then
fi fi
if [ "$restart" = "1" ] ; then if [ "$restart" = "1" ] ; then
if [ "$reboot" = "1" ] ; then if [ "$reboot" = "0" ] ; then
echo "Restarting" echo "Restarting"
sudo systemctl restart cubesatsim sudo systemctl restart cubesatsim
else else

Loading…
Cancel
Save

Powered by TurnKey Linux.