diff --git a/config b/config index aec9bf5f..afc9c020 100755 --- a/config +++ b/config @@ -1207,9 +1207,21 @@ elif [ "$1" = "-e" ]; then elif [ "$1" = "-n" ]; then echo "changing CubeSatSim to Transmit Command and Control mode" - sudo echo "n" > /home/pi/CubeSatSim/.mode - restart=1 + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + if [ "$1" = "n" ]; then + echo "Turning Transmit Command and Control mode OFF" + echo "Switching to FSK mode" + sudo echo "f" > /home/pi/CubeSatSim/.mode + reboot=1 + else + echo "Turning Transmit Command and Control mode ON" + sudo echo "n" > /home/pi/CubeSatSim/.mode + restart=1 + fi elif [ "$1" = "-A" ]; then