|
|
|
@ -122,7 +122,7 @@ elif [ "$1" = "-i" ]; then
|
|
|
|
reboot=1
|
|
|
|
reboot=1
|
|
|
|
## echo "Rebooting CubeSatSim"
|
|
|
|
## echo "Rebooting CubeSatSim"
|
|
|
|
## sudo reboot now
|
|
|
|
## sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
# sudo restart cubesatsim
|
|
|
|
## exit
|
|
|
|
## exit
|
|
|
|
elif [ "$1" = "-a" ]; then
|
|
|
|
elif [ "$1" = "-a" ]; then
|
|
|
|
echo "changing CubeSatSim to AFSK mode"
|
|
|
|
echo "changing CubeSatSim to AFSK mode"
|
|
|
|
@ -139,9 +139,9 @@ elif [ "$1" = "-a" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
reboot=1
|
|
|
|
reboot=1
|
|
|
|
## echo "rebooting"
|
|
|
|
## echo "rebooting"
|
|
|
|
## sudo systemctl stop rpitx
|
|
|
|
## sudo stop rpitx
|
|
|
|
## sudo reboot now
|
|
|
|
## sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
# sudo restart cubesatsim
|
|
|
|
## exit
|
|
|
|
## exit
|
|
|
|
|
|
|
|
|
|
|
|
elif [ "$1" = "-m" ]; then
|
|
|
|
elif [ "$1" = "-m" ]; then
|
|
|
|
@ -158,9 +158,9 @@ elif [ "$1" = "-m" ]; then
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
reboot=1
|
|
|
|
reboot=1
|
|
|
|
## echo "rebooting"
|
|
|
|
## echo "rebooting"
|
|
|
|
## sudo systemctl stop rpitx
|
|
|
|
## sudo stop rpitx
|
|
|
|
## sudo reboot now
|
|
|
|
## sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
# sudo restart cubesatsim
|
|
|
|
## exit
|
|
|
|
## exit
|
|
|
|
elif [ "$1" = "-f" ]; then
|
|
|
|
elif [ "$1" = "-f" ]; then
|
|
|
|
echo "changing CubeSatSim to FSK mode"
|
|
|
|
echo "changing CubeSatSim to FSK mode"
|
|
|
|
@ -168,9 +168,9 @@ elif [ "$1" = "-f" ]; then
|
|
|
|
# if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi
|
|
|
|
# if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi
|
|
|
|
reboot=1
|
|
|
|
reboot=1
|
|
|
|
## echo "rebooting"
|
|
|
|
## echo "rebooting"
|
|
|
|
## sudo systemctl stop rpitx
|
|
|
|
## sudo stop rpitx
|
|
|
|
## sudo reboot now
|
|
|
|
## sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
# sudo restart cubesatsim
|
|
|
|
## exit
|
|
|
|
## exit
|
|
|
|
elif [ "$1" = "-b" ]; then
|
|
|
|
elif [ "$1" = "-b" ]; then
|
|
|
|
echo "changing CubeSatSim to BPSK mode"
|
|
|
|
echo "changing CubeSatSim to BPSK mode"
|
|
|
|
@ -178,9 +178,9 @@ elif [ "$1" = "-b" ]; then
|
|
|
|
# if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi
|
|
|
|
# if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi
|
|
|
|
reboot=1
|
|
|
|
reboot=1
|
|
|
|
## echo "rebooting"
|
|
|
|
## echo "rebooting"
|
|
|
|
## sudo systemctl stop rpitx
|
|
|
|
## sudo stop rpitx
|
|
|
|
## sudo reboot now
|
|
|
|
## sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
# sudo restart cubesatsim
|
|
|
|
## exit
|
|
|
|
## exit
|
|
|
|
elif [ "$1" = "-s" ]; then
|
|
|
|
elif [ "$1" = "-s" ]; then
|
|
|
|
echo "changing CubeSatSim to SSTV mode"
|
|
|
|
echo "changing CubeSatSim to SSTV mode"
|
|
|
|
@ -196,9 +196,9 @@ elif [ "$1" = "-s" ]; then
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
reboot=1
|
|
|
|
reboot=1
|
|
|
|
## echo "rebooting"
|
|
|
|
## echo "rebooting"
|
|
|
|
## sudo systemctl stop rpitx
|
|
|
|
## sudo stop rpitx
|
|
|
|
## sudo reboot now
|
|
|
|
## sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
# sudo restart cubesatsim
|
|
|
|
## exit
|
|
|
|
## exit
|
|
|
|
|
|
|
|
|
|
|
|
elif [ "$1" = "-t" ]; then
|
|
|
|
elif [ "$1" = "-t" ]; then
|
|
|
|
@ -245,7 +245,7 @@ elif [ "$1" = "-t" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
reboot=1
|
|
|
|
reboot=1
|
|
|
|
## sudo reboot now
|
|
|
|
## sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
# sudo restart cubesatsim
|
|
|
|
|
|
|
|
|
|
|
|
elif [ "$1" = "-c" ]; then
|
|
|
|
elif [ "$1" = "-c" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
@ -447,6 +447,7 @@ elif [ "$1" = "-C" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
sudo systemctl stop cubesatsim
|
|
|
|
sudo systemctl stop cubesatsim
|
|
|
|
sudo systemctl stop rpitx
|
|
|
|
sudo systemctl stop rpitx
|
|
|
|
|
|
|
|
sudo systemctl stop command
|
|
|
|
|
|
|
|
|
|
|
|
sudo mv -f /home/pi/CubeSatSim/telem.txt /home/pi/CubeSatSim/telem.txt.bk
|
|
|
|
sudo mv -f /home/pi/CubeSatSim/telem.txt /home/pi/CubeSatSim/telem.txt.bk
|
|
|
|
|
|
|
|
|
|
|
|
@ -540,6 +541,28 @@ elif [ "$1" = "-d" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FILE=/home/pi/CubeSatSim/command_control
|
|
|
|
|
|
|
|
if [ -f "$FILE" ]; then
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "Radio command and control is OFF"
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo "Do you want to set command and control to ON (y/n) "
|
|
|
|
|
|
|
|
read reset
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
|
|
|
|
echo "Command and control set to ON"
|
|
|
|
|
|
|
|
sudo touch /home/pi/CubeSatSim/command_control
|
|
|
|
|
|
|
|
echo "restarting command and control"
|
|
|
|
|
|
|
|
# reboot=1
|
|
|
|
|
|
|
|
sudo systemctl restart command
|
|
|
|
|
|
|
|
## sudo reboot now
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif [ "$1" = "-R" ]; then
|
|
|
|
elif [ "$1" = "-R" ]; then
|
|
|
|
@ -869,7 +892,7 @@ 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 " -i Reboots 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"
|
|
|
|
echo " -r Change the Resets Count in the configuration file sim.cfg"
|
|
|
|
echo " -r Change the Resets Count in the configuration file sim.cfg"
|
|
|
|
@ -881,8 +904,8 @@ elif [ "$1" = "-h" ]; then
|
|
|
|
echo " -R Change the Commands Count in the file command_count.txt"
|
|
|
|
echo " -R Change the Commands Count in the file command_count.txt"
|
|
|
|
echo " -B Change Safe Mode (battery saver mode) manually"
|
|
|
|
echo " -B Change Safe Mode (battery saver mode) manually"
|
|
|
|
echo " -q Change the Squelch setting for command receiver"
|
|
|
|
echo " -q Change the Squelch setting for command receiver"
|
|
|
|
echo " -F Change the rx and tx frequency"
|
|
|
|
echo " -F Change the RX and TX frequency"
|
|
|
|
echo " -H Chnage the Balloon mode"
|
|
|
|
echo " -H Change the Balloon (HAB) mode"
|
|
|
|
echo " -p Display payload sensor data"
|
|
|
|
echo " -p Display payload sensor data"
|
|
|
|
echo " -v Display voltage and current data"
|
|
|
|
echo " -v Display voltage and current data"
|
|
|
|
echo " -P Change the PL (Private Line) CTCSS/CDCSS codes for RX and TX"
|
|
|
|
echo " -P Change the PL (Private Line) CTCSS/CDCSS codes for RX and TX"
|
|
|
|
@ -905,7 +928,7 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$reboot" = "1" ] ; then
|
|
|
|
if [ "$reboot" = "1" ] ; then
|
|
|
|
if [ "$noreboot" = "0" ] ; then
|
|
|
|
if [ "$noreboot" = "0" ] ; then
|
|
|
|
echo 'Reboot due to mode change!' | wall
|
|
|
|
echo 'Reboot due to config change!' | wall
|
|
|
|
echo "Rebooting"
|
|
|
|
echo "Rebooting"
|
|
|
|
sudo systemctl stop rpitx
|
|
|
|
sudo systemctl stop rpitx
|
|
|
|
sudo reboot now
|
|
|
|
sudo reboot now
|
|
|
|
|