change variable $1

pull/60/head
alanbjohnston 5 years ago committed by GitHub
parent 996470d562
commit 4458c6df52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,6 +4,23 @@ echo -e "\nDemo of CubeSatSim at 434.9 MHz\n"
sudo systemctl restart rpitx sudo systemctl restart rpitx
if [ "$1" = "c" ]; then
echo "Mode cycling"
y=$(last reboot | grep ^reboot | wc -l)
echo $y
echo $(($y % 4))
if [ $(($y % 4)) = 0 ]; then
$1 = "a"
elif [ $(($y % 4)) = 1 ]; then
$1 = "b"
elif [ $(($y % 4)) = 2 ]; then
$1 = "s"
else
$1 = "f"
fi
fi
if [ "$1" = "a" ]; then if [ "$1" = "a" ]; then
echo "Mode is continuous AFSK" echo "Mode is continuous AFSK"
/home/pi/CubeSatSim/radioafsk afsk /home/pi/CubeSatSim/radioafsk afsk
@ -13,26 +30,8 @@ elif [ "$1" = "b" ]; then
elif [ "$1" = "s" ]; then elif [ "$1" = "s" ]; then
echo "Mode is continuous SSTV" echo "Mode is continuous SSTV"
while true; do sleep 5; done while true; do sleep 5; done
elif [ "$1" = "f" ]; then else [ "$1" = "f" ]; then
echo "Mode is continuous FSK" echo "Mode is continuous FSK"
/home/pi/CubeSatSim/radioafsk fsk /home/pi/CubeSatSim/radioafsk fsk
else
echo "Mode cycling"
y=$(last reboot | grep ^reboot | wc -l)
echo $y
echo $(($y % 4))
if [ $(($y % 4)) = 0 ]; then
echo "Mode is continuous AFSK"
/home/pi/CubeSatSim/radioafsk afsk
elif [ $(($y % 4)) = 1 ]; then
echo "Mode is continuous BPSK"
/home/pi/CubeSatSim/radioafsk bpsk
elif [ $(($y % 4)) = 2 ]; then
echo "Mode is continuous SSTV"
while true; do sleep 5; done
else
echo "Mode is continuous FSK"
/home/pi/CubeSatSim/radioafsk fsk
fi
fi fi

Loading…
Cancel
Save

Powered by TurnKey Linux.