diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b26f8dae..203b0cf5c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,7 +160,6 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/common/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/srslte/include/) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/cuhd/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/mex/include) -INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/graphics/include) ######################################################################## # Add the subdirectories @@ -169,4 +168,3 @@ ADD_SUBDIRECTORY(common) ADD_SUBDIRECTORY(cuhd) ADD_SUBDIRECTORY(srslte) add_subdirectory(mex) -ADD_SUBDIRECTORY(graphics) diff --git a/cmake/modules/FindLIBSDRGUI.cmake b/cmake/modules/FindLIBSDRGUI.cmake new file mode 100644 index 000000000..42e8dec76 --- /dev/null +++ b/cmake/modules/FindLIBSDRGUI.cmake @@ -0,0 +1,40 @@ +# - Try to find LIBSDRGUI +# Once done this will define +# LIBSDRGUI_FOUND - System has libsdrgui +# LIBSDRGUI_INCLUDE_DIRS - The libsdrgui include directories +# LIBSDRGUI_LIBRARIES - The libsdrgui library + +find_package(PkgConfig) +pkg_check_modules(PC_LIBSDRGUI QUIET libsdrgui) +set(LIBSDRGUI_DEFINITIONS ${PC_LIBSDRGUI_CFLAGS_OTHER}) + +FIND_PATH( + LIBSDRGUI_INCLUDE_DIRS + NAMES libsdrgui/libsdrgui.h + HINTS ${PC_LIBSDRGUI_INCLUDEDIR} + ${PC_LIBSDRGUI_INCLUDE_DIRS} + $ENV{LIBSDRGUI_DIR}/include + PATHS /usr/local/include + /usr/include +) + +FIND_LIBRARY( + LIBSDRGUI_LIBRARIES + NAMES sdrgui + HINTS ${PC_LIBSDRGUI_LIBDIR} + ${CMAKE_INSTALL_PREFIX}/lib + ${CMAKE_INSTALL_PREFIX}/lib64 + $ENV{LIBSDRGUI_DIR}/lib + PATHS /usr/local/lib + /usr/local/lib64 + /usr/lib + /usr/lib64 +) + +message(STATUS "LIBSDRGUI LIBRARIES " ${LIBSDRGUI_LIBRARIES}) +message(STATUS "LIBSDRGUI INCLUDE DIRS " ${LIBSDRGUI_INCLUDE_DIRS}) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSDRGUI DEFAULT_MSG LIBSDRGUI_LIBRARIES LIBSDRGUI_INCLUDE_DIRS) +MARK_AS_ADVANCED(LIBSDRGUI_LIBRARIES LIBSDRGUI_INCLUDE_DIRS) + diff --git a/common/include/srslte/config.h b/common/include/srslte/config.h index 4038a49a9..19445de96 100644 --- a/common/include/srslte/config.h +++ b/common/include/srslte/config.h @@ -58,4 +58,7 @@ #define SRSLTE_ERROR -1 #define SRSLTE_ERROR_INVALID_INPUTS -2 +// cf_t definition +typedef _Complex float cf_t; + #endif // CONFIG_H diff --git a/mex/include/srslte/mex/mexutils.h b/mex/include/srslte/mex/mexutils.h index 95e5c2d96..e189454e0 100644 --- a/mex/include/srslte/mex/mexutils.h +++ b/mex/include/srslte/mex/mexutils.h @@ -40,7 +40,7 @@ #include "srslte/config.h" -typedef _Complex float cf_t; + SRSLTE_API bool mexutils_isScalar(const mxArray *ptr); diff --git a/srslte/include/srslte/agc/agc.h b/srslte/include/srslte/agc/agc.h index 3b116b6ee..c40a5d56a 100644 --- a/srslte/include/srslte/agc/agc.h +++ b/srslte/include/srslte/agc/agc.h @@ -39,7 +39,6 @@ /* Automatic Gain Control * */ -typedef _Complex float cf_t; #define SRSLTE_AGC_DEFAULT_BW (5e-2) diff --git a/srslte/include/srslte/ch_estimation/refsignal_dl.h b/srslte/include/srslte/ch_estimation/refsignal_dl.h index 08ed8581a..2f744b0a3 100644 --- a/srslte/include/srslte/ch_estimation/refsignal_dl.h +++ b/srslte/include/srslte/ch_estimation/refsignal_dl.h @@ -35,8 +35,6 @@ #include "srslte/config.h" #include "srslte/common/phy_common.h" -typedef _Complex float cf_t; - // Number of references in a subframe: there are 2 symbols for port_id=0,1 x 2 slots x 2 refs per prb #define SRSLTE_REFSIGNAL_NUM_SF(nof_prb, port_id) (((port_id)<2?8:4)*(nof_prb)) #define SRSLTE_REFSIGNAL_MAX_NUM_SF(nof_prb) SRSLTE_REFSIGNAL_NUM_SF(nof_prb, 0) diff --git a/srslte/include/srslte/ch_estimation/refsignal_ul.h b/srslte/include/srslte/ch_estimation/refsignal_ul.h index 0be5ad77b..79d487946 100644 --- a/srslte/include/srslte/ch_estimation/refsignal_ul.h +++ b/srslte/include/srslte/ch_estimation/refsignal_ul.h @@ -41,8 +41,6 @@ #define SRSLTE_NOF_DELTA_SS 30 #define SRSLTE_NOF_CSHIFT 8 -typedef _Complex float cf_t; - typedef struct SRSLTE_API { uint32_t cyclic_shift; uint32_t cyclic_shift_for_drms; diff --git a/srslte/include/srslte/channel/ch_awgn.h b/srslte/include/srslte/channel/ch_awgn.h index dcdcba785..4d945be28 100644 --- a/srslte/include/srslte/channel/ch_awgn.h +++ b/srslte/include/srslte/channel/ch_awgn.h @@ -34,8 +34,6 @@ #ifndef CH_AWGN_ #define CH_AWGN_ -typedef _Complex float cf_t; - SRSLTE_API void srslte_ch_awgn_c(const cf_t* input, cf_t* output, float variance, diff --git a/srslte/include/srslte/common/phy_common.h b/srslte/include/srslte/common/phy_common.h index b97c945b2..0810a08ac 100644 --- a/srslte/include/srslte/common/phy_common.h +++ b/srslte/include/srslte/common/phy_common.h @@ -121,8 +121,6 @@ typedef enum {SRSLTE_SRSLTE_CP_NORM, SRSLTE_SRSLTE_CP_EXT} srslte_cp_t; #define SRSLTE_NOF_TC_CB_SIZES 188 -typedef _Complex float cf_t; - typedef enum SRSLTE_API { SRSLTE_PHICH_NORM = 0, SRSLTE_PHICH_EXT diff --git a/srslte/include/srslte/dft/dft.h b/srslte/include/srslte/dft/dft.h index 2e2981dd8..fec958baf 100644 --- a/srslte/include/srslte/dft/dft.h +++ b/srslte/include/srslte/dft/dft.h @@ -67,8 +67,6 @@ typedef struct SRSLTE_API { srslte_dft_mode_t mode; // Complex/Real }srslte_dft_plan_t; -typedef _Complex float cf_t; - /* Create DFT plans */ SRSLTE_API int srslte_dft_plan(srslte_dft_plan_t *plan, diff --git a/srslte/include/srslte/dft/dft_precoding.h b/srslte/include/srslte/dft/dft_precoding.h index a3c60d02a..9465fb273 100644 --- a/srslte/include/srslte/dft/dft_precoding.h +++ b/srslte/include/srslte/dft/dft_precoding.h @@ -33,8 +33,6 @@ #include "srslte/common/phy_common.h" #include "srslte/dft/dft.h" -typedef _Complex float cf_t; - /* DFT-based Transform Precoding object */ typedef struct SRSLTE_API { diff --git a/srslte/include/srslte/dft/ofdm.h b/srslte/include/srslte/dft/ofdm.h index 0dad1dcf6..a46fcb971 100644 --- a/srslte/include/srslte/dft/ofdm.h +++ b/srslte/include/srslte/dft/ofdm.h @@ -37,8 +37,6 @@ #include "srslte/common/phy_common.h" #include "srslte/dft/dft.h" -typedef _Complex float cf_t; /* this is only a shortcut */ - /* This is common for both directions */ typedef struct SRSLTE_API{ srslte_dft_plan_t fft_plan; diff --git a/srslte/include/srslte/mimo/layermap.h b/srslte/include/srslte/mimo/layermap.h index 34edb2677..697c61846 100644 --- a/srslte/include/srslte/mimo/layermap.h +++ b/srslte/include/srslte/mimo/layermap.h @@ -32,8 +32,6 @@ #include "srslte/config.h" #include "srslte/common/phy_common.h" -typedef _Complex float cf_t; - /* Generates the vector of layer-mapped symbols "x" based on the vector of data symbols "d" */ SRSLTE_API int srslte_layermap_single(cf_t *d, diff --git a/srslte/include/srslte/mimo/precoding.h b/srslte/include/srslte/mimo/precoding.h index 40086865a..4336a65e0 100644 --- a/srslte/include/srslte/mimo/precoding.h +++ b/srslte/include/srslte/mimo/precoding.h @@ -31,8 +31,6 @@ #include "srslte/config.h" #include "srslte/common/phy_common.h" -typedef _Complex float cf_t; - /** The precoder takes as input nlayers vectors "x" from the * layer mapping and generates nports vectors "y" to be mapped onto * resources on each of the antenna ports. diff --git a/srslte/include/srslte/modem/demod_hard.h b/srslte/include/srslte/modem/demod_hard.h index b388b0958..76c1af0d2 100644 --- a/srslte/include/srslte/modem/demod_hard.h +++ b/srslte/include/srslte/modem/demod_hard.h @@ -35,8 +35,6 @@ #include "srslte/config.h" #include "modem_table.h" -typedef _Complex float cf_t; - typedef struct SRSLTE_API { srslte_mod_t mod; /* In this implementation, mapping table is hard-coded */ }srslte_demod_hard_t; diff --git a/srslte/include/srslte/modem/mod.h b/srslte/include/srslte/modem/mod.h index d724e6ad2..627b47de1 100644 --- a/srslte/include/srslte/modem/mod.h +++ b/srslte/include/srslte/modem/mod.h @@ -35,8 +35,6 @@ #include "srslte/config.h" #include "modem_table.h" -typedef _Complex float cf_t; - SRSLTE_API int srslte_mod_modulate(srslte_srslte_modem_table_t* table, uint8_t *bits, cf_t* symbols, diff --git a/srslte/include/srslte/modem/modem_table.h b/srslte/include/srslte/modem/modem_table.h index c4cb0184f..42b14a8f9 100644 --- a/srslte/include/srslte/modem/modem_table.h +++ b/srslte/include/srslte/modem/modem_table.h @@ -37,7 +37,6 @@ #include "srslte/common/phy_common.h" #include "srslte/config.h" -typedef _Complex float cf_t; typedef struct SRSLTE_API { uint32_t idx[2][6][32]; uint32_t min_idx[2][64][6]; /* NEW: for each constellation point zone (2, 4, 16, 64 for BPSK, QPSK, 16QAM, 64QAM) the 2x(1, 2, 4, and 6 closest constellation points) for each bit, respectively. */ diff --git a/srslte/include/srslte/phch/dci.h b/srslte/include/srslte/phch/dci.h index 6695b6368..831d7e132 100644 --- a/srslte/include/srslte/phch/dci.h +++ b/srslte/include/srslte/phch/dci.h @@ -34,8 +34,6 @@ #include "srslte/common/phy_common.h" #include "srslte/phch/ra.h" -typedef _Complex float cf_t; - /** * DCI message generation according to the formats, as specified in * 36.212 Section 5.3.3.1 diff --git a/srslte/include/srslte/phch/pbch.h b/srslte/include/srslte/phch/pbch.h index 5b0316472..9bcf92c14 100644 --- a/srslte/include/srslte/phch/pbch.h +++ b/srslte/include/srslte/phch/pbch.h @@ -48,8 +48,6 @@ #define PBCH_RE_SRSLTE_SRSLTE_CP_NORM 240 #define PBCH_RE_SRSLTE_SRSLTE_CP_EXT 216 -typedef _Complex float cf_t; - /* PBCH object */ typedef struct SRSLTE_API { srslte_cell_t cell; diff --git a/srslte/include/srslte/phch/pcfich.h b/srslte/include/srslte/phch/pcfich.h index c2f04c202..1cd97c274 100644 --- a/srslte/include/srslte/phch/pcfich.h +++ b/srslte/include/srslte/phch/pcfich.h @@ -40,8 +40,6 @@ #define PCFICH_CFI_LEN 32 #define PCFICH_RE PCFICH_CFI_LEN/2 -typedef _Complex float cf_t; - /* PCFICH object */ typedef struct SRSLTE_API { srslte_cell_t cell; diff --git a/srslte/include/srslte/phch/pdcch.h b/srslte/include/srslte/phch/pdcch.h index 01fa0e209..4a9694585 100644 --- a/srslte/include/srslte/phch/pdcch.h +++ b/srslte/include/srslte/phch/pdcch.h @@ -42,7 +42,7 @@ #include "srslte/phch/dci.h" #include "srslte/phch/regs.h" -typedef _Complex float cf_t; + typedef enum SRSLTE_API { diff --git a/srslte/include/srslte/phch/pdsch.h b/srslte/include/srslte/phch/pdsch.h index e04b1875c..a3a923b13 100644 --- a/srslte/include/srslte/phch/pdsch.h +++ b/srslte/include/srslte/phch/pdsch.h @@ -43,7 +43,7 @@ #define SRSLTE_PDSCH_MAX_TDEC_ITERS 5 -typedef _Complex float cf_t; + /* PDSCH object */ typedef struct SRSLTE_API { diff --git a/srslte/include/srslte/phch/phich.h b/srslte/include/srslte/phch/phich.h index 76c437cd1..20e9da050 100644 --- a/srslte/include/srslte/phch/phich.h +++ b/srslte/include/srslte/phch/phich.h @@ -38,7 +38,7 @@ #include "srslte/scrambling/scrambling.h" #include "regs.h" -typedef _Complex float cf_t; + #define SRSLTE_PHICH_NORM_NSEQUENCES 8 #define SRSLTE_PHICH_EXT_NSEQUENCES 4 diff --git a/srslte/include/srslte/phch/prach.h b/srslte/include/srslte/phch/prach.h index adce53944..6b001b600 100644 --- a/srslte/include/srslte/phch/prach.h +++ b/srslte/include/srslte/phch/prach.h @@ -35,7 +35,7 @@ #include "srslte/config.h" #include "srslte/dft/dft.h" -typedef _Complex float cf_t; + /** Generation and detection of RACH signals for uplink. * Currently only supports preamble formats 0-3. diff --git a/srslte/include/srslte/phch/pucch.h b/srslte/include/srslte/phch/pucch.h index 8feea36e1..6b7128da2 100644 --- a/srslte/include/srslte/phch/pucch.h +++ b/srslte/include/srslte/phch/pucch.h @@ -41,8 +41,6 @@ #include "srslte/phch/harq.h" #include "srslte/dft/dft_precoding.h" -typedef _Complex float cf_t; - #define SRSLTE_PUCCH_N_SEQ 12 // Only Format 1, 1a and 1b supported #define SRSLTE_PUCCH_MAX_BITS 2 #define SRSLTE_PUCCH_N_SF_MAX 4 diff --git a/srslte/include/srslte/phch/pusch.h b/srslte/include/srslte/phch/pusch.h index fecf45370..e8d559162 100644 --- a/srslte/include/srslte/phch/pusch.h +++ b/srslte/include/srslte/phch/pusch.h @@ -43,7 +43,7 @@ #define SRSLTE_PUSCH_MAX_TDEC_ITERS 5 -typedef _Complex float cf_t; + typedef struct { diff --git a/srslte/include/srslte/phch/regs.h b/srslte/include/srslte/phch/regs.h index 9a66f4ab1..9b57fada8 100644 --- a/srslte/include/srslte/phch/regs.h +++ b/srslte/include/srslte/phch/regs.h @@ -42,8 +42,6 @@ #define REGS_RE_X_REG 4 -typedef _Complex float cf_t; - typedef struct SRSLTE_API { uint32_t k[4]; uint32_t k0; diff --git a/srslte/include/srslte/resampling/decim.h b/srslte/include/srslte/resampling/decim.h index f7c6759db..7897cfb14 100644 --- a/srslte/include/srslte/resampling/decim.h +++ b/srslte/include/srslte/resampling/decim.h @@ -26,12 +26,10 @@ */ #ifndef DECIM_H -#define DECIM_H_ +#define DECIM_H #include "srslte/config.h" -typedef _Complex float cf_t; - SRSLTE_API void srslte_decim_c(cf_t *input, cf_t *output, diff --git a/srslte/include/srslte/resampling/interp.h b/srslte/include/srslte/resampling/interp.h index daf047bd7..353f91371 100644 --- a/srslte/include/srslte/resampling/interp.h +++ b/srslte/include/srslte/resampling/interp.h @@ -32,8 +32,6 @@ #include "srslte/config.h" -typedef _Complex float cf_t; - /************* STATIC LINEAR INTERPOLATION FUNCTIONS */ diff --git a/srslte/include/srslte/resampling/resample_arb.h b/srslte/include/srslte/resampling/resample_arb.h index cd17a042b..d22192bfb 100644 --- a/srslte/include/srslte/resampling/resample_arb.h +++ b/srslte/include/srslte/resampling/resample_arb.h @@ -33,8 +33,6 @@ #include "srslte/config.h" -typedef _Complex float cf_t; - #define SRSLTE_RESAMPLE_ARB_N 32 // Polyphase filter rows #define SRSLTE_RESAMPLE_ARB_M 8 // Polyphase filter columns diff --git a/srslte/include/srslte/scrambling/scrambling.h b/srslte/include/srslte/scrambling/scrambling.h index 0be7a5944..c4d285c58 100644 --- a/srslte/include/srslte/scrambling/scrambling.h +++ b/srslte/include/srslte/scrambling/scrambling.h @@ -33,8 +33,6 @@ #include "srslte/common/sequence.h" #include "srslte/common/phy_common.h" -typedef _Complex float cf_t; - /* Scrambling has no state */ SRSLTE_API void srslte_scrambling_b(srslte_sequence_t *s, uint8_t *data); diff --git a/srslte/include/srslte/sync/cfo.h b/srslte/include/srslte/sync/cfo.h index e85682929..df33fb888 100644 --- a/srslte/include/srslte/sync/cfo.h +++ b/srslte/include/srslte/sync/cfo.h @@ -34,8 +34,6 @@ #include "srslte/config.h" #include "srslte/utils/cexptab.h" -typedef _Complex float cf_t; - /** If the frequency is changed more than the tolerance, a new table is generated */ #define SRSLTE_CFO_TOLERANCE 0.00001 diff --git a/srslte/include/srslte/sync/pss.h b/srslte/include/srslte/sync/pss.h index 513268709..e27e42db0 100644 --- a/srslte/include/srslte/sync/pss.h +++ b/srslte/include/srslte/sync/pss.h @@ -36,8 +36,6 @@ #include "srslte/common/phy_common.h" #include "srslte/utils/convolution.h" -typedef _Complex float cf_t; /* this is only a shortcut */ - #define CONVOLUTION_FFT #define SRSLTE_PSS_LEN 62 diff --git a/srslte/include/srslte/sync/sss.h b/srslte/include/srslte/sync/sss.h index d56bf2c62..f7535576d 100644 --- a/srslte/include/srslte/sync/sss.h +++ b/srslte/include/srslte/sync/sss.h @@ -36,8 +36,6 @@ #include "srslte/common/phy_common.h" #include "srslte/dft/dft.h" -typedef _Complex float cf_t; /* this is only a shortcut */ - #define SRSLTE_SSS_N 31 #define SRSLTE_SSS_LEN 2*SRSLTE_SSS_N diff --git a/srslte/include/srslte/utils/cexptab.h b/srslte/include/srslte/utils/cexptab.h index a46d80f0b..9e6cb7764 100644 --- a/srslte/include/srslte/utils/cexptab.h +++ b/srslte/include/srslte/utils/cexptab.h @@ -33,8 +33,6 @@ #include #include "srslte/config.h" -typedef _Complex float cf_t; - typedef struct SRSLTE_API { uint32_t size; cf_t *tab; diff --git a/srslte/include/srslte/utils/convolution.h b/srslte/include/srslte/utils/convolution.h index 930d94235..3dd6f0507 100644 --- a/srslte/include/srslte/utils/convolution.h +++ b/srslte/include/srslte/utils/convolution.h @@ -32,8 +32,6 @@ #include "srslte/config.h" #include "srslte/dft/dft.h" -typedef _Complex float cf_t; - typedef struct SRSLTE_API { cf_t *input_fft; cf_t *filter_fft; diff --git a/srslte/include/srslte/utils/vector.h b/srslte/include/srslte/utils/vector.h index 92b287b4b..9d5aceb51 100644 --- a/srslte/include/srslte/utils/vector.h +++ b/srslte/include/srslte/utils/vector.h @@ -37,8 +37,6 @@ extern "C" { #include #include "srslte/config.h" -typedef _Complex float cf_t; - #define SRSLTE_MAX(a,b) ((a)>(b)?(a):(b)) #define SRSLTE_MIN(a,b) ((a)<(b)?(a):(b)) diff --git a/srslte/lib/CMakeLists.txt b/srslte/lib/CMakeLists.txt index 5b5624e5f..527239303 100644 --- a/srslte/lib/CMakeLists.txt +++ b/srslte/lib/CMakeLists.txt @@ -38,6 +38,8 @@ ELSE(${DISABLE_VOLK}) FIND_PACKAGE(Volk) ENDIF(${DISABLE_VOLK}) +FIND_PACKAGE(LIBSDRGUI) + ######################################################################## # Recurse subdirectories and compile all source files into the same lib ######################################################################## diff --git a/srslte/lib/fec/src/parity.h b/srslte/lib/fec/src/parity.h index 5ad4b1b5c..d2d4d0c56 100644 --- a/srslte/lib/fec/src/parity.h +++ b/srslte/lib/fec/src/parity.h @@ -11,7 +11,7 @@ /* Determine parity of argument: 1 = odd, 0 = even */ #ifdef __i386__ static inline uint32_t parityb(uint8_t x){ - __asm__ __volatile__ ("test %1,%1;setpo %0" : "=qhm" (x) : "qh" (x)); + __asm__ __volatile__ ("test %1,%1;setpo %0" : "=q" (x) : "q" (x)); return x; } #else diff --git a/srslte/lib/fec/test/turbodecoder_test.c b/srslte/lib/fec/test/turbodecoder_test.c index e8ac5e6b1..f96ba16d5 100644 --- a/srslte/lib/fec/test/turbodecoder_test.c +++ b/srslte/lib/fec/test/turbodecoder_test.c @@ -39,7 +39,7 @@ #include "turbodecoder_test.h" -typedef _Complex float cf_t; + uint32_t frame_length = 1000, nof_frames = 100; float ebno_db = 100.0; diff --git a/srslte/lib/fec/test/viterbi_test.c b/srslte/lib/fec/test/viterbi_test.c index 25b267693..7f7a7e61f 100644 --- a/srslte/lib/fec/test/viterbi_test.c +++ b/srslte/lib/fec/test/viterbi_test.c @@ -37,7 +37,7 @@ #include "viterbi_test.h" -typedef _Complex float cf_t; + int frame_length = 1000, nof_frames = 128; float ebno_db = 100.0; diff --git a/srslte/lib/modem/src/soft_algs.c b/srslte/lib/modem/src/soft_algs.c index c4d9064d5..8bb3eb15f 100644 --- a/srslte/lib/modem/src/soft_algs.c +++ b/srslte/lib/modem/src/soft_algs.c @@ -42,7 +42,7 @@ #define QAM64_THRESHOLD_3 6/sqrt(42) -typedef _Complex float cf_t; + // There are 3 implemenations: 1 - based on zones; 2 - using volk, 3 - straightforward C #define LLR_SRSLTE_DEMOD_SOFT_ALG_APPROX_IMPLEMENTATION 1 diff --git a/srslte/lib/phch/src/prb_dl.h b/srslte/lib/phch/src/prb_dl.h index 3aea25003..4603363bd 100644 --- a/srslte/lib/phch/src/prb_dl.h +++ b/srslte/lib/phch/src/prb_dl.h @@ -25,8 +25,7 @@ * */ - -typedef _Complex float cf_t; +#include "srslte/config.h" void prb_cp_ref(cf_t **input, cf_t **output, int offset, int nof_refs, int nof_intervals, bool advance_input); diff --git a/srslte/lib/phch/test/prach_test.c b/srslte/lib/phch/test/prach_test.c index 593897e93..29a86a111 100644 --- a/srslte/lib/phch/test/prach_test.c +++ b/srslte/lib/phch/test/prach_test.c @@ -9,7 +9,7 @@ #include "srslte/phch/prach.h" #define MAX_LEN 70176 -typedef _Complex float cf_t; + uint32_t N_ifft_ul = 128; uint32_t preamble_format = 0; diff --git a/srslte/lib/phch/test/prach_test_multi.c b/srslte/lib/phch/test/prach_test_multi.c index 8b3e54c2f..83f65dacb 100644 --- a/srslte/lib/phch/test/prach_test_multi.c +++ b/srslte/lib/phch/test/prach_test_multi.c @@ -9,7 +9,7 @@ #include "srslte/phch/prach.h" #define MAX_LEN 70176 -typedef _Complex float cf_t; + uint32_t N_ifft_ul = 128; uint32_t preamble_format = 0; diff --git a/srslte/lib/resampling/test/resample_arb_bench.c b/srslte/lib/resampling/test/resample_arb_bench.c index 9c94344f5..cdd909ab5 100644 --- a/srslte/lib/resampling/test/resample_arb_bench.c +++ b/srslte/lib/resampling/test/resample_arb_bench.c @@ -8,7 +8,7 @@ #include "srslte/srslte.h" #include "srslte/resampling/resample_arb.h" -typedef _Complex float cf_t; + int main(int argc, char **argv) { int N=10000000; diff --git a/srslte/lib/resampling/test/resample_arb_test.c b/srslte/lib/resampling/test/resample_arb_test.c index 13d333405..fcdb49a03 100644 --- a/srslte/lib/resampling/test/resample_arb_test.c +++ b/srslte/lib/resampling/test/resample_arb_test.c @@ -8,7 +8,7 @@ #include "srslte/srslte.h" #include "srslte/resampling/resample_arb.h" -typedef _Complex float cf_t; + int main(int argc, char **argv) { int N = 100; // Number of sinwave samples diff --git a/srslte/lib/sync/test/CMakeLists.txt b/srslte/lib/sync/test/CMakeLists.txt index e3878a911..3b2d441ba 100644 --- a/srslte/lib/sync/test/CMakeLists.txt +++ b/srslte/lib/sync/test/CMakeLists.txt @@ -24,16 +24,15 @@ ######################################################################## LIST(FIND OPTIONAL_LIBS cuhd CUHD_FIND) -LIST(FIND OPTIONAL_LIBS graphics GRAPHICS_FIND) IF(${CUHD_FIND} GREATER -1) ADD_EXECUTABLE(pss_usrp pss_usrp.c) TARGET_LINK_LIBRARIES(pss_usrp lte_phy cuhd) - IF(${GRAPHICS_FIND} EQUAL -1) - SET_TARGET_PROPERTIES(pss_usrp PROPERTIES COMPILE_DEFINITIONS "DISABLE_GRAPHICS") - ELSE(${GRAPHICS_FIND} EQUAL -1) + IF(LIBSDRGUI_FOUND) target_link_libraries(pss_usrp graphics) - ENDIF(${GRAPHICS_FIND} EQUAL -1) + ELSE(LIBSDRGUI_FOUND) + SET_TARGET_PROPERTIES(pss_usrp PROPERTIES COMPILE_DEFINITIONS "DISABLE_GRAPHICS") + ENDIF(LIBSDRGUI_FOUND) ENDIF(${CUHD_FIND} GREATER -1) diff --git a/srslte/lib/sync/test/pss_usrp.c b/srslte/lib/sync/test/pss_usrp.c index efc19a241..26f5d4573 100644 --- a/srslte/lib/sync/test/pss_usrp.c +++ b/srslte/lib/sync/test/pss_usrp.c @@ -335,7 +335,7 @@ extern cf_t *tmp2; #ifndef DISABLE_GRAPHICS -#include "srslte/graphics/plot.h" +#include "libsdrgui/libsdrgui.h" plot_real_t pssout; //plot_complex_t pce; diff --git a/srslte/lib/utils/test/dft_test.c b/srslte/lib/utils/test/dft_test.c index 072cacd36..d9078dc33 100644 --- a/srslte/lib/utils/test/dft_test.c +++ b/srslte/lib/utils/test/dft_test.c @@ -8,7 +8,7 @@ #include "srslte/dft/dft.h" -typedef _Complex float cf_t; + int N = 256; bool forward = true;