mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
: FT8 demod: implement Qt dependency and export for MSVC
This commit is contained in:
parent
38fbcc65b7
commit
60debc5d83
@ -20,6 +20,7 @@ set(ft8_HEADERS
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/exports
|
||||
${CMAKE_SOURCE_DIR}/sdrbase
|
||||
)
|
||||
|
||||
add_library(ft8 SHARED
|
||||
@ -29,6 +30,7 @@ add_library(ft8 SHARED
|
||||
target_link_libraries(ft8
|
||||
${FFTW3F_LIBRARIES}
|
||||
Qt::Core
|
||||
sdrbase
|
||||
)
|
||||
|
||||
install(TARGETS ft8 DESTINATION ${INSTALL_LIB_DIR})
|
||||
|
@ -36,10 +36,7 @@
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <complex>
|
||||
#include <sys/time.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <atomic>
|
||||
#include <random>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
|
24
ft8/util.cpp
24
ft8/util.cpp
@ -21,34 +21,20 @@
|
||||
#include <sys/time.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <complex>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include "util/timeutil.h"
|
||||
#include "util.h"
|
||||
|
||||
namespace FT8 {
|
||||
|
||||
double now()
|
||||
{
|
||||
struct timeval tv;
|
||||
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);
|
||||
return TimeUtil::nowus() / 1000000.0;
|
||||
// struct timeval tv;
|
||||
// gettimeofday(&tv, 0);
|
||||
// return tv.tv_sec + tv.tv_usec / 1000000.0;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -27,7 +27,6 @@
|
||||
namespace FT8 {
|
||||
|
||||
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);
|
||||
float vmax(const std::vector<float> &v);
|
||||
std::vector<float> vreal(const std::vector<std::complex<float>> &a);
|
||||
|
Loading…
Reference in New Issue
Block a user