|
|
|
@ -612,7 +612,7 @@ elif [ "$1" = "-T" ]; then
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
echo "Command and control set to OFF"
|
|
|
|
echo "Turning command and control OFF"
|
|
|
|
sudo rm /home/pi/CubeSatSim/command_control > /dev/null 2>&1
|
|
|
|
sudo rm /home/pi/CubeSatSim/command_control > /dev/null 2>&1
|
|
|
|
# reboot=1
|
|
|
|
# reboot=1
|
|
|
|
echo "restarting command and control"
|
|
|
|
echo "restarting command and control"
|
|
|
|
@ -623,21 +623,30 @@ elif [ "$1" = "-T" ]; then
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "Radio command and control is OFF"
|
|
|
|
echo "Radio command and control is OFF"
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo "Do you want to set command and control to ON (y/n) "
|
|
|
|
echo "Do you want to set command and control to ON (y/n) "
|
|
|
|
read reset
|
|
|
|
read reset
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
|
|
|
|
echo "Command and control set to ON"
|
|
|
|
|
|
|
|
sudo touch /home/pi/CubeSatSim/command_control
|
|
|
|
value=`cat /home/pi/CubeSatSim/.mode`
|
|
|
|
echo "restarting command and control"
|
|
|
|
echo "$value" > /dev/null
|
|
|
|
# reboot=1
|
|
|
|
set -- $value
|
|
|
|
sudo systemctl restart command
|
|
|
|
|
|
|
|
echo "restarting transmit"
|
|
|
|
if [ "$1" != "n" ] ; then
|
|
|
|
sudo systemctl restart transmit
|
|
|
|
echo "Turning command and control ON"
|
|
|
|
## sudo reboot now
|
|
|
|
sudo touch /home/pi/CubeSatSim/command_control
|
|
|
|
|
|
|
|
echo "restarting command and control"
|
|
|
|
|
|
|
|
# reboot=1
|
|
|
|
|
|
|
|
sudo systemctl restart command
|
|
|
|
|
|
|
|
echo "restarting transmit"
|
|
|
|
|
|
|
|
sudo systemctl restart transmit
|
|
|
|
|
|
|
|
## sudo reboot now
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "Can't turn on Command and control in Transmit Commands mode."
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|