kopia lustrzana https://github.com/kgoba/ft8_lib
make win32/MSYS compatible
rodzic
50ee0c0636
commit
a8d400187f
|
@ -6,4 +6,5 @@ wsjtx2/
|
|||
.build/
|
||||
.DS_Store
|
||||
.vscode/
|
||||
__pycache__/
|
||||
__pycache__/
|
||||
*.exe
|
11
Makefile
11
Makefile
|
@ -1,5 +1,7 @@
|
|||
BUILD_DIR = .build
|
||||
|
||||
USE_ASAN = 1 # Set to 1 to enable AddressSanitizer
|
||||
|
||||
FT8_SRC = $(wildcard ft8/*.c)
|
||||
FT8_OBJ = $(patsubst %.c,$(BUILD_DIR)/%.o,$(FT8_SRC))
|
||||
|
||||
|
@ -11,9 +13,14 @@ FFT_OBJ = $(patsubst %.c,$(BUILD_DIR)/%.o,$(FFT_SRC))
|
|||
|
||||
TARGETS = gen_ft8 decode_ft8 test_ft8
|
||||
|
||||
CFLAGS = -fsanitize=address -O3 -ggdb3
|
||||
CFLAGS = -D_GNU_SOURCE -O3 -ggdb3
|
||||
CPPFLAGS = -std=c11 -I.
|
||||
LDFLAGS = -fsanitize=address -lm
|
||||
LDFLAGS = -lm
|
||||
|
||||
ifeq ($(USE_ASAN), 1)
|
||||
CFLAGS += -fsanitize=address
|
||||
LDFLAGS += -fsanitize=address
|
||||
endif
|
||||
|
||||
# Optionally, use Portaudio for live audio input
|
||||
ifdef PORTAUDIO_PREFIX
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
#define LOG_LEVEL LOG_INFO
|
||||
#include <ft8/debug.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define gmtime_r(timep, result) gmtime_s(result, timep)
|
||||
#endif
|
||||
|
||||
const int kMin_score = 10; // Minimum sync score threshold for candidates
|
||||
const int kMax_candidates = 140;
|
||||
const int kLDPC_iterations = 25;
|
||||
|
|
|
@ -10,6 +10,16 @@
|
|||
#define NTOKENS ((uint32_t)2063592ul)
|
||||
#define MAXGRID4 ((uint16_t)32400ul)
|
||||
|
||||
#ifndef HAVE_STPCPY
|
||||
#define HAVE_STPCPY
|
||||
|
||||
static char *stpcpy(char *dest, const char *src) {
|
||||
strcpy(dest, src);
|
||||
return dest + strlen(src);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////// Static function prototypes //////////////////////////////////////////////////////////////
|
||||
|
||||
static bool trim_brackets(char* result, const char* original, int length);
|
||||
|
|
10
test/test.c
10
test/test.c
|
@ -15,6 +15,16 @@
|
|||
#define LOG_LEVEL LOG_INFO
|
||||
#include "ft8/debug.h"
|
||||
|
||||
#ifndef HAVE_STPCPY
|
||||
#define HAVE_STPCPY
|
||||
|
||||
static char *stpcpy(char *dest, const char *src) {
|
||||
strcpy(dest, src);
|
||||
return dest + strlen(src);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// void convert_8bit_to_6bit(uint8_t* dst, const uint8_t* src, int nBits)
|
||||
// {
|
||||
// // Zero-fill the destination array as we will only be setting bits later
|
||||
|
|
Ładowanie…
Reference in New Issue