Skip to content

Commit

Permalink
update transmit-wspr-message.c
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-demin committed Oct 4, 2023
1 parent 42b62fe commit 2ac4e83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions projects/sdr_transceiver_wspr/app/transmit-wspr-message.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
Expand All @@ -19,13 +20,13 @@ int main(int argc, char *argv[])
volatile uint16_t *coef[2];
volatile uint32_t *fifo;
unsigned char symbols[162];
char *message, *hashtab;
char *message, *hashtab, *loctab;
config_t config;
double freq, corr, dphi, level;
int chan;

hashtab = malloc(sizeof(char) * 32768 * 13);
memset(hashtab, 0, sizeof(char) * 32768 * 13);
hashtab = calloc(32768 * 13, sizeof(char));
loctab = calloc(32768 * 5, sizeof(char));

if(argc != 2)
{
Expand Down Expand Up @@ -131,7 +132,7 @@ int main(int argc, char *argv[])
*rst &= ~1;
*rst |= 1;

get_wspr_channel_symbols(message, hashtab, symbols);
get_wspr_channel_symbols(message, hashtab, loctab, symbols);

for(i = 0; i < 162; ++i)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
Expand All @@ -19,13 +20,13 @@ int main(int argc, char *argv[])
volatile uint16_t *coef[2];
volatile uint32_t *fifo;
unsigned char symbols[162];
char *message, *hashtab;
char *message, *hashtab, *loctab;
config_t config;
double freq, corr, dphi, level;
int chan;

hashtab = malloc(sizeof(char) * 32768 * 13);
memset(hashtab, 0, sizeof(char) * 32768 * 13);
hashtab = calloc(32768 * 13, sizeof(char));
loctab = calloc(32768 * 5, sizeof(char));

if(argc != 2)
{
Expand Down Expand Up @@ -131,7 +132,7 @@ int main(int argc, char *argv[])
*rst &= ~1;
*rst |= 1;

get_wspr_channel_symbols(message, hashtab, symbols);
get_wspr_channel_symbols(message, hashtab, loctab, symbols);

for(i = 0; i < 162; ++i)
{
Expand Down

0 comments on commit 2ac4e83

Please sign in to comment.