From 4d1fa7f7a44ff49f0e35025ebc7cdc88c0d5b83e Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 8 Nov 2020 17:54:04 -0500 Subject: [PATCH] Update demo.sh --- demo.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/demo.sh b/demo.sh index dce8c805..65935e0b 100755 --- a/demo.sh +++ b/demo.sh @@ -8,20 +8,10 @@ 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 + echo $(($y % 4)) fi -if [ "$1" = "a" ]; then +if [[ ("$1" = "a" ) || (("$1" = "c") && ("$(($y %4)))) ]]; then echo "Mode is continuous AFSK" /home/pi/CubeSatSim/radioafsk afsk elif [ "$1" = "b" ]; then