From 835cf3b11e257f7a21ba7b4aa9ed0133620c59a2 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 16 May 2018 21:33:52 +0200 Subject: [PATCH] Rename CMake module for gr-iio to a more consistent name. Minor fixes --- CMakeLists.txt | 2 +- cmake/Modules/{Findiio.cmake => FindGriio.cmake} | 0 src/algorithms/PVT/libs/rtklib_solver.cc | 2 +- src/algorithms/libs/rtklib/rtklib_stream.cc | 2 +- src/algorithms/signal_source/adapters/CMakeLists.txt | 3 +-- src/algorithms/signal_source/libs/CMakeLists.txt | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) rename cmake/Modules/{Findiio.cmake => FindGriio.cmake} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 954690ffb..ccce85891 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF) option(ENABLE_PLUTOSDR "Enable the use of ADALM-PLUTO Evaluation Boards (Analog Devices Inc.), requires gr-iio" OFF) option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware, requires gr-iio" OFF) -option(ENABLE_AD9361 "Enable the use of AD9361 directo to FPGA hardware, requires gr-iio" OFF) +option(ENABLE_AD9361 "Enable the use of AD9361 directo to FPGA hardware, requires libiio" OFF) option(ENABLE_RAW_UDP "Enable the use of high-optimized custom UDP packet sample source, requires libpcap" OFF) # Performance analysis tools diff --git a/cmake/Modules/Findiio.cmake b/cmake/Modules/FindGriio.cmake similarity index 100% rename from cmake/Modules/Findiio.cmake rename to cmake/Modules/FindGriio.cmake diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index a0650d768..06332cc30 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -70,7 +70,7 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag count_valid_position = 0; this->set_averaging_flag(false); rtk_ = rtk; - for (unsigned int i = 0; i > 4; i++) dop_[i] = 0.0; + for (unsigned int i = 0; i < 4; i++) dop_[i] = 0.0; pvt_sol = {{0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, '0', '0', '0', 0, 0, 0}; // ############# ENABLE DATA FILE LOG ################# diff --git a/src/algorithms/libs/rtklib/rtklib_stream.cc b/src/algorithms/libs/rtklib/rtklib_stream.cc index 3de693e65..6d307a1d1 100644 --- a/src/algorithms/libs/rtklib/rtklib_stream.cc +++ b/src/algorithms/libs/rtklib/rtklib_stream.cc @@ -1603,7 +1603,7 @@ void *ftpthread(void *arg) " --glob=off --passive-ftp " + std::string(proxyopt) + "s-t 1 -T " + std::to_string(FTP_TIMEOUT) + " -O \"" + std::string(local) + "\""; int k = s_aux.length(); - if (k < 2048) + if (k < 1024]) for (int i = 0; i < k; i++) opt[i] = s_aux[i]; // sprintf(cmd, "%s%s %s \"ftp://%s/%s\" 2> \"%s\"\n", env, FTP_CMD, opt, ftp->addr, diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index 120fff27b..78061f7f5 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -50,11 +50,10 @@ if(ENABLE_RAW_UDP) set(OPT_LIBRARIES ${OPT_LIBRARIES} ${PCAP_LIBRARIES}) set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${PCAP_INCLUDE_DIRS}) set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} custom_udp_signal_source.cc) - endif(ENABLE_RAW_UDP) if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) - find_package(iio REQUIRED) + find_package(Griio REQUIRED) if(NOT IIO_FOUND) message(STATUS "gnuradio-iio not found, its installation is required.") message(STATUS "Please build and install the following projects:") diff --git a/src/algorithms/signal_source/libs/CMakeLists.txt b/src/algorithms/signal_source/libs/CMakeLists.txt index f37684525..8ace0c109 100644 --- a/src/algorithms/signal_source/libs/CMakeLists.txt +++ b/src/algorithms/signal_source/libs/CMakeLists.txt @@ -17,7 +17,7 @@ # if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) - find_package(iio REQUIRED) + find_package(Griio REQUIRED) if(NOT IIO_FOUND) message(STATUS "gnuradio-iio not found, its installation is required.") message(STATUS "Please build and install the following projects:")