From 46e26e649f35e00d9fceab04f164cb5fe1337037 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 20 Oct 2018 08:50:12 -0400 Subject: [PATCH] CW and AFSK workng together! --- afsk/send_afsk.c | 6 +++--- cw/cw_main.c | 11 +++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/afsk/send_afsk.c b/afsk/send_afsk.c index 22235988..eb2d44a7 100644 --- a/afsk/send_afsk.c +++ b/afsk/send_afsk.c @@ -34,7 +34,7 @@ void config_x25(); void trans_x25(); int send_afsk(void) { - return 0; + setSpiChannel(SPI_CHANNEL); setSpiSpeed(SPI_SPEED); initializeSpi(); @@ -48,7 +48,7 @@ int send_afsk(void) { /* Infinite loop */ // for (;;) { - sleep(2); +// sleep(2); // send X.25 packet @@ -78,7 +78,7 @@ int send_afsk(void) { } // } - sleep(20); + // sleep(20); return 0; } diff --git a/cw/cw_main.c b/cw/cw_main.c index 1b32f635..810489d6 100644 --- a/cw/cw_main.c +++ b/cw/cw_main.c @@ -30,7 +30,7 @@ #include #include #include -//#include <../afsk/send_afsk.h> +#include <../afsk/send_afsk.h> #define MAX_MESSAGE_LENGTH (197) @@ -59,8 +59,8 @@ int main(void) { uint8_t retVal; - // int res = send_afsk(); - // printf("Result: %d \n",res); + send_afsk(); +// printf("Result: %d \n",res); // Configure SPI bus to AX5043 setSpiChannel(SPI_CHANNEL); @@ -118,10 +118,13 @@ int main(void) int msg_length; while(1) { // loop forever + //send_afsk(); + //config_cw(); for (channel = 0; channel < 7; channel++) { - if (channel == 0) { // start with telemetry header "hi hi" plus a few chars to help CW decoding software sync + if (channel == 0) { +// start with telemetry header "hi hi" plus a few chars to help CW decoding software sync msg_length = encode_header(&packet[0], MAX_MESSAGE_LENGTH + 1); printf("\nINFO: Sending TLM header\n");