|
|
|
@ -183,7 +183,7 @@ elif [ "$1" = "-h" ]; then
|
|
|
|
echo " -l Change the Latitude and Longitude in the configuration file sim.cfg"
|
|
|
|
echo " -l Change the Latitude and Longitude in the configuration file sim.cfg"
|
|
|
|
echo " -S Scan both I2C buses on the Raspberry Pi"
|
|
|
|
echo " -S Scan both I2C buses on the Raspberry Pi"
|
|
|
|
echo " -C Clear logs"
|
|
|
|
echo " -C Clear logs"
|
|
|
|
echo " -T Change command state"
|
|
|
|
echo " Change command and control state"
|
|
|
|
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 battery saver mode manually"
|
|
|
|
echo " -B Change battery saver mode manually"
|
|
|
|
echo " -q Change the Squelch setting for command receiver"
|
|
|
|
echo " -q Change the Squelch setting for command receiver"
|
|
|
|
@ -449,29 +449,38 @@ elif [ "$1" = "-C" ]; then
|
|
|
|
elif [ "$1" = "-T" ]; then
|
|
|
|
elif [ "$1" = "-T" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo "Change command state"
|
|
|
|
echo "Change command and control state"
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
|
|
echo "Current command state is:"
|
|
|
|
FILE=/home/pi/CubeSatSim/command_control
|
|
|
|
cat /home/pi/CubeSatSim/command_tx
|
|
|
|
if [ -f "$FILE" ]; then
|
|
|
|
echo
|
|
|
|
echo "Radio command and control is ON"
|
|
|
|
|
|
|
|
echo "Do you want to turn command and control to OFF (y/n) "
|
|
|
|
|
|
|
|
read reset
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
|
|
|
|
echo "Command and control set to OFF"
|
|
|
|
|
|
|
|
sudo rm /home/pi/CubeSatSim/command_control
|
|
|
|
|
|
|
|
echo "rebooting"
|
|
|
|
|
|
|
|
sudo systemctl stop rpitx
|
|
|
|
|
|
|
|
sudo reboot now
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "Radio command and control is OFF"
|
|
|
|
|
|
|
|
echo "Do you want to set beacon transmit 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 "rebooting"
|
|
|
|
|
|
|
|
sudo systemctl stop rpitx
|
|
|
|
|
|
|
|
sudo reboot now
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo "Do you want to set beacon transmit to ON (y/n) "
|
|
|
|
|
|
|
|
read reset
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
|
|
|
|
sudo sed -i 's/False/True/g' /home/pi/CubeSatSim/command_tx
|
|
|
|
|
|
|
|
echo "Command state set to True to enable beacon"
|
|
|
|
|
|
|
|
echo "rebooting"
|
|
|
|
|
|
|
|
sudo systemctl stop rpitx
|
|
|
|
|
|
|
|
sudo reboot now
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
sudo sed -i 's/True/False/g' /home/pi/CubeSatSim/command_tx
|
|
|
|
|
|
|
|
echo "Command state set to False to disable beacon"
|
|
|
|
|
|
|
|
echo "rebooting"
|
|
|
|
|
|
|
|
sudo systemctl stop rpitx
|
|
|
|
|
|
|
|
sudo reboot now
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
elif [ "$1" = "-R" ]; then
|
|
|
|
elif [ "$1" = "-R" ]; then
|
|
|
|
|