From 05e7996d9fcc5372820f46103bec133e16214770 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 23 Feb 2020 12:13:42 +0000 Subject: [PATCH] fixing no CW when mode cycling --- afsk/main.c | 9 +++++++-- demo.sh | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/afsk/main.c b/afsk/main.c index 9839cf5d..2aa90b1f 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -272,7 +272,10 @@ int main(int argc, char *argv[]) { if (argc > 3) { if (*argv[3] == 'n') + { cw_id = OFF; + printf("No CW id\n"); + } } } @@ -401,7 +404,7 @@ if (vB4) // Send ID in CW (Morse Code) -if (cw_id) // Don't send CW if using AX5043 or in mode cycling or set by 3rd argument +if (cw_id == ON) // Don't send CW if using AX5043 or in mode cycling or set by 3rd argument { char cw_str[200]; char cw_header[] = "echo 'de "; @@ -767,7 +770,9 @@ if (firstTime != ON) printf("Sample period: %d\n",millis() - sampleTime); sampleTime = millis(); - } + } else + printf("first time - no sleep\n"); + int count; for (count = 0; count < 8; count++) { diff --git a/demo.sh b/demo.sh index e984c73d..dcda3a37 100755 --- a/demo.sh +++ b/demo.sh @@ -1,6 +1,6 @@ #!/bin/bash -echo -e "\nDemo of CubeSatSim at 434.9 MHz continuously\n\n" +echo -e "\nDemo of CubeSatSim at 434.9 MHz\n" #exit @@ -18,6 +18,7 @@ else while true; do echo -e "\n Changing mode ******\n\n" /home/pi/CubeSatSim/radioafsk fsk 5 n + sleep 8 /home/pi/CubeSatSim/radioafsk bpsk 5 n /home/pi/CubeSatSim/radioafsk afsk 5 n done