CW and AFSK workng together!

pull/1/head
Alan Johnston 7 years ago
parent 90353f214f
commit 46e26e649f

@ -34,7 +34,7 @@ void config_x25();
void trans_x25(); void trans_x25();
int send_afsk(void) { int send_afsk(void) {
return 0;
setSpiChannel(SPI_CHANNEL); setSpiChannel(SPI_CHANNEL);
setSpiSpeed(SPI_SPEED); setSpiSpeed(SPI_SPEED);
initializeSpi(); initializeSpi();
@ -48,7 +48,7 @@ int send_afsk(void) {
/* Infinite loop */ /* Infinite loop */
// for (;;) { // for (;;) {
sleep(2); // sleep(2);
// send X.25 packet // send X.25 packet
@ -78,7 +78,7 @@ int send_afsk(void) {
} }
// } // }
sleep(20); // sleep(20);
return 0; return 0;
} }

@ -30,7 +30,7 @@
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <wiringPiI2C.h> #include <wiringPiI2C.h>
//#include <../afsk/send_afsk.h> #include <../afsk/send_afsk.h>
#define MAX_MESSAGE_LENGTH (197) #define MAX_MESSAGE_LENGTH (197)
@ -59,8 +59,8 @@ int main(void)
{ {
uint8_t retVal; uint8_t retVal;
// int res = send_afsk(); send_afsk();
// printf("Result: %d \n",res); // printf("Result: %d \n",res);
// Configure SPI bus to AX5043 // Configure SPI bus to AX5043
setSpiChannel(SPI_CHANNEL); setSpiChannel(SPI_CHANNEL);
@ -118,10 +118,13 @@ int main(void)
int msg_length; int msg_length;
while(1) { // loop forever while(1) { // loop forever
//send_afsk();
//config_cw();
for (channel = 0; channel < 7; channel++) { 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); msg_length = encode_header(&packet[0], MAX_MESSAGE_LENGTH + 1);
printf("\nINFO: Sending TLM header\n"); printf("\nINFO: Sending TLM header\n");

Loading…
Cancel
Save

Powered by TurnKey Linux.