|
|
|
@ -98,9 +98,9 @@ elif [ "$1" = "-a" ]; then
|
|
|
|
sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt
|
|
|
|
sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo "rebooting"
|
|
|
|
# echo "rebooting"
|
|
|
|
sudo reboot now
|
|
|
|
# sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
sudo systemctl restart cubesatsim
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|
elif [ "$1" = "-m" ]; then
|
|
|
|
elif [ "$1" = "-m" ]; then
|
|
|
|
echo "changing CubeSatSim to CW mode"
|
|
|
|
echo "changing CubeSatSim to CW mode"
|
|
|
|
@ -114,25 +114,25 @@ elif [ "$1" = "-m" ]; then
|
|
|
|
echo "Not battery saver mode"
|
|
|
|
echo "Not battery saver mode"
|
|
|
|
sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt
|
|
|
|
sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
echo "rebooting"
|
|
|
|
# echo "rebooting"
|
|
|
|
sudo reboot now
|
|
|
|
# sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
sudo systemctl restart cubesatsim
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|
elif [ "$1" = "-f" ]; then
|
|
|
|
elif [ "$1" = "-f" ]; then
|
|
|
|
echo "changing CubeSatSim to FSK mode"
|
|
|
|
echo "changing CubeSatSim to FSK mode"
|
|
|
|
sudo echo "f" > /home/pi/CubeSatSim/.mode
|
|
|
|
sudo echo "f" > /home/pi/CubeSatSim/.mode
|
|
|
|
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
|
|
|
|
echo "rebooting"
|
|
|
|
# echo "rebooting"
|
|
|
|
sudo reboot now
|
|
|
|
# sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
sudo systemctl restart cubesatsim
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|
elif [ "$1" = "-b" ]; then
|
|
|
|
elif [ "$1" = "-b" ]; then
|
|
|
|
echo "changing CubeSatSim to BPSK mode"
|
|
|
|
echo "changing CubeSatSim to BPSK mode"
|
|
|
|
sudo echo "b" > /home/pi/CubeSatSim/.mode
|
|
|
|
sudo echo "b" > /home/pi/CubeSatSim/.mode
|
|
|
|
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
|
|
|
|
echo "rebooting"
|
|
|
|
# echo "rebooting"
|
|
|
|
sudo reboot now
|
|
|
|
# sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
sudo systemctl restart cubesatsim
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|
elif [ "$1" = "-s" ]; then
|
|
|
|
elif [ "$1" = "-s" ]; then
|
|
|
|
echo "changing CubeSatSim to SSTV mode"
|
|
|
|
echo "changing CubeSatSim to SSTV mode"
|
|
|
|
@ -146,9 +146,9 @@ elif [ "$1" = "-s" ]; then
|
|
|
|
echo "Not battery saver mode"
|
|
|
|
echo "Not battery saver mode"
|
|
|
|
sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt
|
|
|
|
sudo sed -i ':a;N;$!ba;s/\nforce_turbo=1//g' /boot/config.txt
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
echo "rebooting"
|
|
|
|
# echo "rebooting"
|
|
|
|
sudo reboot now
|
|
|
|
# sudo reboot now
|
|
|
|
# sudo systemctl restart cubesatsim
|
|
|
|
sudo systemctl restart cubesatsim
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|
elif [ "$1" = "-h" ]; then
|
|
|
|
elif [ "$1" = "-h" ]; then
|
|
|
|
echo "config OPTION"
|
|
|
|
echo "config OPTION"
|
|
|
|
@ -419,9 +419,10 @@ elif [ "$1" = "-C" ]; then
|
|
|
|
sudo journalctl --rotate
|
|
|
|
sudo journalctl --rotate
|
|
|
|
sudo journalctl --vacuum-time=1s
|
|
|
|
sudo journalctl --vacuum-time=1s
|
|
|
|
|
|
|
|
|
|
|
|
sudo systemctl reboot now
|
|
|
|
# sudo systemctl reboot now
|
|
|
|
|
|
|
|
sudo systemctl restart cubesatsim
|
|
|
|
|
|
|
|
|
|
|
|
echo "rebooting"
|
|
|
|
# echo "rebooting"
|
|
|
|
|
|
|
|
|
|
|
|
elif [ "$1" = "-T" ]; then
|
|
|
|
elif [ "$1" = "-T" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
@ -440,13 +441,15 @@ elif [ "$1" = "-T" ]; then
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
sudo sed -i 's/False/True/g' /home/pi/CubeSatSim/command_tx
|
|
|
|
sudo sed -i 's/False/True/g' /home/pi/CubeSatSim/command_tx
|
|
|
|
echo "Command state set to True to enable beacon"
|
|
|
|
echo "Command state set to True to enable beacon"
|
|
|
|
echo "rebooting"
|
|
|
|
# echo "rebooting"
|
|
|
|
sudo reboot now
|
|
|
|
# sudo reboot now
|
|
|
|
|
|
|
|
sudo systemctl restart cubesatsim
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sudo sed -i 's/True/False/g' /home/pi/CubeSatSim/command_tx
|
|
|
|
sudo sed -i 's/True/False/g' /home/pi/CubeSatSim/command_tx
|
|
|
|
echo "Command state set to False to disable beacon"
|
|
|
|
echo "Command state set to False to disable beacon"
|
|
|
|
echo "rebooting"
|
|
|
|
# echo "rebooting"
|
|
|
|
sudo reboot now
|
|
|
|
# sudo reboot now
|
|
|
|
|
|
|
|
sudo systemctl restart cubesatsim
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
elif [ "$1" = "-R" ]; then
|
|
|
|
elif [ "$1" = "-R" ]; then
|
|
|
|
|