|
|
|
|
@ -22,7 +22,7 @@ function transmit_command_aprs {
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a"
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null
|
|
|
|
|
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 APRS"
|
|
|
|
|
@ -185,7 +185,7 @@ elif [ "$1" = "-a" ]; then
|
|
|
|
|
# echo "Transmit mode 1 is APRS"
|
|
|
|
|
|
|
|
|
|
# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a"
|
|
|
|
|
# sudo rm /home/pi/CubeSatSim/t.txt > /dev/null
|
|
|
|
|
# sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
|
|
|
|
|
# echo $STRING > /home/pi/CubeSatSim/t.txt
|
|
|
|
|
# echo
|
|
|
|
|
# echo -n "Sending APRS packet "
|
|
|
|
|
@ -531,7 +531,7 @@ elif [ "$1" = "-T" ]; then
|
|
|
|
|
|
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
|
echo "Command and control set to OFF"
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/command_control > /dev/null
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/command_control > /dev/null 2>&1
|
|
|
|
|
# reboot=1
|
|
|
|
|
echo "restarting command and control"
|
|
|
|
|
sudo systemctl restart command
|
|
|
|
|
@ -578,7 +578,7 @@ elif [ "$1" = "-d" ]; then
|
|
|
|
|
|
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
|
echo "Command and control Direwolf set to OFF"
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/command_control_direwolf > /dev/null
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/command_control_direwolf > /dev/null 2>&1
|
|
|
|
|
# reboot=1
|
|
|
|
|
## echo "rebooting"
|
|
|
|
|
sudo systemctl restart command
|
|
|
|
|
@ -645,7 +645,7 @@ elif [ "$1" = "-D" ]; then
|
|
|
|
|
|
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
|
echo "Transmit commands in APRS"
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/transmit_dtmf > /dev/null
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/transmit_dtmf > /dev/null 2>&1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
@ -676,7 +676,7 @@ elif [ "$1" = "-R" ]; then
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/command_count.txt > /dev/null
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/command_count.txt > /dev/null 2>&1
|
|
|
|
|
echo "Commands count reset to 0"
|
|
|
|
|
echo "0\n" > /home/pi/CubeSatSim/command_count.txt
|
|
|
|
|
else
|
|
|
|
|
@ -717,7 +717,7 @@ elif [ "$1" = "-B" ]; then
|
|
|
|
|
|
|
|
|
|
if [ "$mode" = "1" ] ; then
|
|
|
|
|
echo "Safe Mode will be turned OFF. Battery saver mode will be turned OFF"
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/battery_saver > /dev/null
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/battery_saver > /dev/null 2>&1
|
|
|
|
|
reboot=1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
@ -1012,7 +1012,7 @@ elif [ "$1" = "-A" ]; then
|
|
|
|
|
|
|
|
|
|
sudo systemctl stop cubesatsim
|
|
|
|
|
sudo systemctl stop rpitx
|
|
|
|
|
# sudo rm /home/pi/CubeSatSim/t.txt > /dev/null
|
|
|
|
|
# sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
|
|
|
|
|
|
|
|
|
|
sudo python3 -u /home/pi/CubeSatSim/rpitx.py x > /dev/null 2>&1 & # Force APRS mode
|
|
|
|
|
fi
|
|
|
|
|
@ -1052,7 +1052,7 @@ elif [ "$1" = "-A" ]; then
|
|
|
|
|
STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=?"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
|
|
|
|
|
echo $STRING > /home/pi/CubeSatSim/t.txt
|
|
|
|
|
echo
|
|
|
|
|
echo -n "Sending APRS packet "
|
|
|
|
|
@ -1066,7 +1066,7 @@ elif [ "$1" = "-A" ]; then
|
|
|
|
|
read sim
|
|
|
|
|
echo
|
|
|
|
|
done
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1
|
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
|
|
|
|
|
|
if [ "$1" != "n" ]; then
|
|
|
|
|
|