1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-08-04 15:02:25 -04:00

: FT8 demod: implement Qt dependency and export for MSVC

This commit is contained in:
f4exb 2023-01-11 01:32:14 +01:00
parent 38fbcc65b7
commit 60debc5d83
4 changed files with 7 additions and 23 deletions

View File

@ -20,6 +20,7 @@ set(ft8_HEADERS
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/exports ${CMAKE_SOURCE_DIR}/exports
${CMAKE_SOURCE_DIR}/sdrbase
) )
add_library(ft8 SHARED add_library(ft8 SHARED
@ -29,6 +30,7 @@ add_library(ft8 SHARED
target_link_libraries(ft8 target_link_libraries(ft8
${FFTW3F_LIBRARIES} ${FFTW3F_LIBRARIES}
Qt::Core Qt::Core
sdrbase
) )
install(TARGETS ft8 DESTINATION ${INSTALL_LIB_DIR}) install(TARGETS ft8 DESTINATION ${INSTALL_LIB_DIR})

View File

@ -36,10 +36,7 @@
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include <complex> #include <complex>
#include <sys/time.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#include <atomic>
#include <random> #include <random>
#include <functional> #include <functional>
#include <map> #include <map>

View File

@ -21,34 +21,20 @@
#include <sys/time.h> #include <sys/time.h>
#include <assert.h> #include <assert.h>
#include <math.h> #include <math.h>
#include <string.h>
#include <complex> #include <complex>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include "util/timeutil.h"
#include "util.h" #include "util.h"
namespace FT8 { namespace FT8 {
double now() double now()
{ {
struct timeval tv; return TimeUtil::nowus() / 1000000.0;
gettimeofday(&tv, 0); // struct timeval tv;
return tv.tv_sec + tv.tv_usec / 1000000.0; // gettimeofday(&tv, 0);
} // return tv.tv_sec + tv.tv_usec / 1000000.0;
void writetxt(std::vector<float> v, const char *filename)
{
FILE *fp = fopen(filename, "w");
if (fp == 0)
{
fprintf(stderr, "could not write %s\n", filename);
exit(1);
}
for (ulong i = 0; i < v.size(); i++)
{
fprintf(fp, "%f\n", v[i]);
}
fclose(fp);
} }
// //

View File

@ -27,7 +27,6 @@
namespace FT8 { namespace FT8 {
double now(); double now();
void writetxt(std::vector<float> v, const char *filename);
std::complex<float> goertzel(std::vector<float> v, int rate, int i0, int n, float hz); std::complex<float> goertzel(std::vector<float> v, int rate, int i0, int n, float hz);
float vmax(const std::vector<float> &v); float vmax(const std::vector<float> &v);
std::vector<float> vreal(const std::vector<std::complex<float>> &a); std::vector<float> vreal(const std::vector<std::complex<float>> &a);