Update config fixed -T command and control setting

pull/302/head
Alan Johnston 2 years ago committed by GitHub
parent d145816919
commit 7d4e62b60c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -183,7 +183,7 @@ elif [ "$1" = "-h" ]; then
echo " -l Change the Latitude and Longitude in the configuration file sim.cfg"
echo " -S Scan both I2C buses on the Raspberry Pi"
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 " -B Change battery saver mode manually"
echo " -q Change the Squelch setting for command receiver"
@ -449,29 +449,38 @@ elif [ "$1" = "-C" ]; then
elif [ "$1" = "-T" ]; then
echo
echo "Change command state"
echo "Change command and control state"
echo
echo "Current command state is:"
cat /home/pi/CubeSatSim/command_tx
echo
FILE=/home/pi/CubeSatSim/command_control
if [ -f "$FILE" ]; then
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
elif [ "$1" = "-R" ]; then

Loading…
Cancel
Save

Powered by TurnKey Linux.