Merge remote-tracking branch 'upstream/master' into adsb_improvements

This commit is contained in:
Jon Beniston 2020-11-06 13:49:58 +00:00
commit 2579417e4d
107 changed files with 466 additions and 516 deletions

View File

@ -9,36 +9,42 @@ matrix:
fast_finish: false fast_finish: false
environment: environment:
# my_variable:
# secure: kyU5TaXRoily6q/QLRLqal2xCFGWEdnb8AJIu7FknsUQyj1wjRGmqC2My+Wfszod
matrix: matrix:
- TARGET: vs2017gui - TARGET: vs2019gui
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019'
# RelWithDebInfo
configuration: Release configuration: Release
# CMAKE_CUSTOM_OPTIONS: "-DENABLE_EXTERNAL_LIBRARIES=OFF" CMAKE_CUSTOM_OPTIONS: "-DCMAKE_BUILD_TYPE=Release \
CMAKE_CUSTOM_OPTIONS: "-DFORCE_SSE41=ON -DQT_MISSING=OFF -DDEBUG_OUTPUT=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF" -DFORCE_SSE41=ON \
CMAKE_GENERATOR: "Visual Studio 15 2017 Win64" -DDEBUG_OUTPUT=ON \
-DENABLE_MIRISDR=OFF \
-DBUILD_SERVER=OFF \
-DCMAKE_PREFIX_PATH=C:\\Qt\\5.15.1\\msvc2019_64;C:\\Libraries\\boost_1_73_0"
CMAKE_GENERATOR: Ninja
- TARGET: ubuntu2004prod - TARGET: ubuntu2004prod
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004 APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
CMAKE_CUSTOM_OPTIONS: "-DFORCE_SSE41=ON -DDEBUG_OUTPUT=ON -DENABLE_EXTERNAL_LIBRARIES=ON" CC: "gcc-9"
CXX: "g++-9"
CMAKE_CUSTOM_OPTIONS: "-DCMAKE_BUILD_TYPE=Release \
-DFORCE_SSE41=ON \
-DDEBUG_OUTPUT=ON \
-DENABLE_EXTERNAL_LIBRARIES=ON \
-DBUILD_SERVER=OFF"
# image:
# - &linux Ubuntu1804
# - matrix: { only: [ image: *linux ] }
for: for:
- matrix: - matrix:
only: only:
- APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019'
cache: cache:
- C:\ProgramData\chocolatey\bin - C:\ProgramData\chocolatey\bin
- C:\ProgramData\chocolatey\lib - C:\ProgramData\chocolatey\lib
#- C:\Tools\vcpkg\installed
build_script: build_script:
- call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
# Install GNU patch as applying patches with git fails in BladeRF tree
- choco install patch
- git submodule update --init --recursive - git submodule update --init --recursive
- mkdir build && cd build - mkdir build && cd build
- cmake ..\ -G "%CMAKE_GENERATOR%" %CMAKE_CUSTOM_OPTIONS% - cmake .. -G "%CMAKE_GENERATOR%" %CMAKE_CUSTOM_OPTIONS%
- cmake --build . --config Release --target PACKAGE - cmake --build . --config Release --target package
artifacts: # push installer executable artifacts: # push installer executable
path: build\*.exe path: build\*.exe
name: installer name: installer
@ -76,7 +82,7 @@ for:
libopus-dev libcodec2-dev libairspy-dev libhackrf-dev \ libopus-dev libcodec2-dev libairspy-dev libhackrf-dev \
libbladerf-dev libsoapysdr-dev libiio-dev libuhd-dev \ libbladerf-dev libsoapysdr-dev libiio-dev libuhd-dev \
python3-mako python3-cheetah python3-numpy \ python3-mako python3-cheetah python3-numpy \
autoconf automake libtool autoconf automake libtool ninja-build
- sh: if [[ ! "${CMAKE_CUSTOM_OPTIONS}" =~ "ENABLE_EXTERNAL_LIBRARIES=ON" ]]; then bash cmake/ci/build_cm256cc.sh; fi - sh: if [[ ! "${CMAKE_CUSTOM_OPTIONS}" =~ "ENABLE_EXTERNAL_LIBRARIES=ON" ]]; then bash cmake/ci/build_cm256cc.sh; fi
- sh: if [[ ! "${CMAKE_CUSTOM_OPTIONS}" =~ "ENABLE_EXTERNAL_LIBRARIES=ON" ]]; then bash cmake/ci/build_mbelib.sh; fi - sh: if [[ ! "${CMAKE_CUSTOM_OPTIONS}" =~ "ENABLE_EXTERNAL_LIBRARIES=ON" ]]; then bash cmake/ci/build_mbelib.sh; fi
- sh: if [[ ! "${CMAKE_CUSTOM_OPTIONS}" =~ "ENABLE_EXTERNAL_LIBRARIES=ON" ]]; then bash cmake/ci/build_serialdv.sh; fi - sh: if [[ ! "${CMAKE_CUSTOM_OPTIONS}" =~ "ENABLE_EXTERNAL_LIBRARIES=ON" ]]; then bash cmake/ci/build_serialdv.sh; fi
@ -90,7 +96,7 @@ for:
- sh: bash -c export - sh: bash -c export
- sh: bash -c pwd - sh: bash -c pwd
build_script: build_script:
- sh: bash cmake/ci/build_sdrangel.sh - sh: ./cmake/ci/build_sdrangel.sh
test_script: test_script:
# debian build path # debian build path
- sh: ./obj-x86_64-linux-gnu/sdrangelbench - sh: ./obj-x86_64-linux-gnu/sdrangelbench

View File

@ -1,3 +1,15 @@
sdrangel (4.21.2-1) unstable; urgency=medium
* Windows package: upgrade to VS 2019 and Qt 5.15.1. PR #683
* Package builds: migrate to Ninja. PR #683
* Define _USE_MATH_DEFINES and clean M_PI redefinitions. PR #682
* NFM Demod: Refactored audio scaling. PR #682 + fix
* NFM Demod: Fix CTCSS check logic: PR #682
* NFM: review frequency deviation
* KiwiSDR: fixed issue in local network. Fixes #435
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Fri, 06 Nov 2020 05:21:24 +0100
sdrangel (4.21.1-1) unstable; urgency=medium sdrangel (4.21.1-1) unstable; urgency=medium
* ADS-B demod: optimization of sync word correlation. Implements #675 * ADS-B demod: optimization of sync word correlation. Implements #675

View File

@ -1,10 +1,6 @@
cmake_minimum_required(VERSION 3.1.0) cmake_minimum_required(VERSION 3.10.0)
# force 64bit on windows because we have only that library set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
# TODO discuss because, at this days, a dsp software should be 64bit
# if(WIN32 AND NOT CMAKE_GENERATOR_PLATFORM AND NOT CMAKE_C_COMPILER AND NOT CMAKE_CXX_COMPILER)
# set(CMAKE_GENERATOR_PLATFORM "x64" CACHE INTERNAL "")
# endif()
project(sdrangel) project(sdrangel)
@ -18,7 +14,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
# configure version # configure version
set(sdrangel_VERSION_MAJOR "4") set(sdrangel_VERSION_MAJOR "4")
set(sdrangel_VERSION_MINOR "21") set(sdrangel_VERSION_MINOR "21")
set(sdrangel_VERSION_PATCH "1") set(sdrangel_VERSION_PATCH "2")
set(sdrangel_VERSION_SUFFIX "") set(sdrangel_VERSION_SUFFIX "")
# SDRAngel cmake options # SDRAngel cmake options
@ -62,6 +58,11 @@ add_definitions("-DCOPYRIGHT=\"${COPYRIGHT}\"")
set(IDENTIFIER "com.${COMPANY}.${APPLICATION_NAME}") set(IDENTIFIER "com.${COMPANY}.${APPLICATION_NAME}")
add_definitions("-DIDENTIFIER=\"${IDENTIFIER}\"") add_definitions("-DIDENTIFIER=\"${IDENTIFIER}\"")
add_compile_definitions(_USE_MATH_DEFINES)
if(WIN32)
add_compile_definitions(NOMINMAX)
endif()
find_package(Git) find_package(Git)
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git/") if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git/")
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags
@ -192,39 +193,35 @@ elseif(APPLE)
"${CMAKE_BINARY_DIR}/Info.plist" @ONLY) "${CMAKE_BINARY_DIR}/Info.plist" @ONLY)
elseif (WIN32) elseif (WIN32)
# check compiler version # check compiler version
if(MSVC_VERSION GREATER 1910 AND MSVC_VERSION LESS 1919) if(MSVC_VERSION GREATER 1920 AND MSVC_VERSION LESS 1929)
set(VS2019 ON)
elseif(MSVC_VERSION GREATER 1910 AND MSVC_VERSION LESS 1919)
set(VS2017 ON) set(VS2017 ON)
elseif(MSVC_VERSION GREATER 1899 AND MSVC_VERSION LESS 1910) elseif(MSVC_VERSION GREATER 1899 AND MSVC_VERSION LESS 1910)
set(VS2015 ON) set(VS2015 ON)
endif() endif()
if(NOT VS2015 AND NOT VS2017) if(NOT VS2015 AND NOT VS2017 AND NOT VS2019)
message(FATAL_ERROR "You must use Microsoft Visual Studio 2015 or 2017 as compiler") message(FATAL_ERROR "You must use Microsoft Visual Studio 2015, 2017 or 2019 as compiler")
endif() endif()
# used on code but not defined on VS2017
add_definitions(-D__WINDOWS__)
# compile with full multicore # compile with full multicore
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} /MP /w") if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /w") add_compile_definitions(/MP)
# find Qt folder
if(DEFINED QT_PATH)
set (QT_MISSING False)
endif() endif()
include(QtLocator)
# in alternative we can use ExternalProject # in alternative we can use ExternalProject
set(EXTERNAL_LIBRARY_FOLDER "${CMAKE_SOURCE_DIR}/external/windows") set(EXTERNAL_LIBRARY_FOLDER "${CMAKE_SOURCE_DIR}/external/windows")
set(BOOST_ROOT "${EXTERNAL_LIBRARY_FOLDER}/boost" CACHE INTERNAL "")
set(BOOST_LIBRARYDIR "${EXTERNAL_LIBRARY_FOLDER}/boost/lib64-msvc-14.1" CACHE INTERNAL "")
set(FFTW3F_FOUND ON CACHE INTERNAL "") set(FFTW3F_FOUND ON CACHE INTERNAL "")
set(FFTW3F_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/fftw-3/include" CACHE INTERNAL "") set(FFTW3F_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/fftw-3/include" CACHE INTERNAL "")
set(FFTW3F_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/fftw-3/libfftw3f-3.lib" CACHE INTERNAL "") set(FFTW3F_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/fftw-3/libfftw3f-3.lib" CACHE INTERNAL "")
set(LIBUSB_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/libusb/include" CACHE INTERNAL "") set(LIBUSB_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/libusb/include" CACHE INTERNAL "")
set(LIBUSB_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/libusb/MS64/dll/libusb-1.0.lib" CACHE INTERNAL "") set(LIBUSB_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/libusb/MS64/dll/libusb-1.0.lib" CACHE INTERNAL "")
set(OpenCV_DIR "${EXTERNAL_LIBRARY_FOLDER}/opencv" CACHE INTERNAL "") if(VS2019)
set(OpenCV_DIR "${EXTERNAL_LIBRARY_FOLDER}/opencv4" CACHE INTERNAL "")
else()
set(OpenCV_DIR "${EXTERNAL_LIBRARY_FOLDER}/opencv" CACHE INTERNAL "")
endif()
set(PKG_CONFIG_EXECUTABLE "${EXTERNAL_LIBRARY_FOLDER}/pkg-config-lite/bin/pkg-config.exe" CACHE INTERNAL "") set(PKG_CONFIG_EXECUTABLE "${EXTERNAL_LIBRARY_FOLDER}/pkg-config-lite/bin/pkg-config.exe" CACHE INTERNAL "")
set(SOAPYSUPPORT_DIR "${EXTERNAL_LIBRARY_FOLDER}/soapysdr-support" CACHE INTERNAL "") set(SOAPYSUPPORT_DIR "${EXTERNAL_LIBRARY_FOLDER}/soapysdr-support" CACHE INTERNAL "")
@ -260,7 +257,6 @@ elseif (WIN32)
# used on fixup_bundle phase # used on fixup_bundle phase
set(WINDOWS_FIXUP_BUNDLE_LIB_DIRS set(WINDOWS_FIXUP_BUNDLE_LIB_DIRS
"${Qt5_DIR}../../../bin"
"${EXTERNAL_LIBRARY_FOLDER}/fftw-3" "${EXTERNAL_LIBRARY_FOLDER}/fftw-3"
"${EXTERNAL_LIBRARY_FOLDER}/libusb/MS64/dll" "${EXTERNAL_LIBRARY_FOLDER}/libusb/MS64/dll"
"${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/bin" "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/bin"
@ -371,11 +367,7 @@ if(WIN32)
set(OpenCV_ARCH "86") set(OpenCV_ARCH "86")
endif() endif()
if(VS2015) set(OpenCV_LIBS_BIN_DIR "${OpenCV_DIR}/x${OpenCV_ARCH}/${OpenCV_RUNTIME}/bin" CACHE INTERNAL "")
set(OpenCV_LIBS_BIN_DIR "${OpenCV_DIR}/x${OpenCV_ARCH}/vc14/bin" CACHE INTERNAL "")
elseif(VS2017)
set(OpenCV_LIBS_BIN_DIR "${OpenCV_DIR}/x${OpenCV_ARCH}/vc15/bin" CACHE INTERNAL "")
endif()
set(WINDOWS_FIXUP_BUNDLE_LIB_DIRS set(WINDOWS_FIXUP_BUNDLE_LIB_DIRS
"${WINDOWS_FIXUP_BUNDLE_LIB_DIRS}" "${WINDOWS_FIXUP_BUNDLE_LIB_DIRS}"

View File

@ -37,7 +37,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QCoreApplication::setApplicationName(APPLICATION_NAME); QCoreApplication::setApplicationName(APPLICATION_NAME);
QCoreApplication::setApplicationVersion(SDRANGEL_VERSION); QCoreApplication::setApplicationVersion(SDRANGEL_VERSION);
#if QT_VERSION >= 0x050600 #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps
#endif #endif
@ -102,7 +102,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
MainParser parser; MainParser parser;
parser.parse(*qApp); parser.parse(*qApp);
#if QT_VERSION >= 0x050400 #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
qInfo("%s %s Qt %s %db %s %s DSP Rx:%db Tx:%db PID %lld", qInfo("%s %s Qt %s %db %s %s DSP Rx:%db Tx:%db PID %lld",
qPrintable(qApp->applicationName()), qPrintable(qApp->applicationName()),
qPrintable(qApp->applicationVersion()), qPrintable(qApp->applicationVersion()),

View File

@ -71,7 +71,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
ParserBench parser; ParserBench parser;
parser.parse(a); parser.parse(a);
#if QT_VERSION >= 0x050400 #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
qInfo("%s %s Qt %s %db %s %s DSP Rx:%db Tx:%db PID %lld", qInfo("%s %s Qt %s %db %s %s DSP Rx:%db Tx:%db PID %lld",
qPrintable(QCoreApplication::applicationName()), qPrintable(QCoreApplication::applicationName()),
qPrintable(QCoreApplication::applicationVersion()), qPrintable(QCoreApplication::applicationVersion()),

View File

@ -70,7 +70,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
MainParser parser; MainParser parser;
parser.parse(a); parser.parse(a);
#if QT_VERSION >= 0x050400 #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
qInfo("%s %s Qt %s %db %s %s DSP Rx:%db Tx:%db PID %lld", qInfo("%s %s Qt %s %db %s %s DSP Rx:%db Tx:%db PID %lld",
qPrintable(QCoreApplication::applicationName()), qPrintable(QCoreApplication::applicationName()),
qPrintable(QCoreApplication::applicationVersion()), qPrintable(QCoreApplication::applicationVersion()),

View File

@ -25,6 +25,8 @@ function(windeployqt target bindir qmldir)
--dir "${bindir}" --dir "${bindir}"
--qmldir "${qmldir}" --qmldir "${qmldir}"
--multimedia --multimedia
--websockets
--opengl
\"$<TARGET_FILE:${target}>\" \"$<TARGET_FILE:${target}>\"
COMMENT "Deploying Qt..." COMMENT "Deploying Qt..."
) )
@ -38,6 +40,8 @@ function(windeployqt target bindir qmldir)
--dir "${bindir}/winqt" --dir "${bindir}/winqt"
--qmldir "${qmldir}" --qmldir "${qmldir}"
--multimedia --multimedia
--websockets
--opengl
\"$<TARGET_FILE:${target}>\" \"$<TARGET_FILE:${target}>\"
COMMENT "Deploying Qt..." COMMENT "Deploying Qt..."
) )

View File

@ -1,48 +0,0 @@
SET(QT_MISSING True)
# msvc only; mingw will need different logic
IF(MSVC)
# look for user-registry pointing to qtcreator
GET_FILENAME_COMPONENT(QT_BIN [HKEY_CURRENT_USER\\Software\\Classes\\Applications\\QtProject.QtCreator.pro\\shell\\Open\\Command] PATH)
# get root path so we can search for 5.3, 5.4, 5.5, etc
STRING(REPLACE "/Tools" ";" QT_BIN "${QT_BIN}")
LIST(GET QT_BIN 0 QT_BIN)
FILE(GLOB QT_VERSIONS "${QT_BIN}/5.*")
LIST(SORT QT_VERSIONS)
# assume the latest version will be last alphabetically
LIST(REVERSE QT_VERSIONS)
LIST(GET QT_VERSIONS 0 QT_VERSION)
# fix any double slashes which seem to be common
STRING(REPLACE "//" "/" QT_VERSION "${QT_VERSION}")
# do some math trickery to guess folder
# - qt uses (e.g.) "msvc2012"
# - cmake uses (e.g.) "1800"
# - see also https://cmake.org/cmake/help/v3.0/variable/MSVC_VERSION.html
# checkcompiler version
if(MSVC_VERSION GREATER 1910 AND MSVC_VERSION LESS 1919)
set(QT_MSVC 2017)
elseif(MSVC_VERSION GREATER 1899 AND MSVC_VERSION LESS 1910)
set(QT_MSVC 2015)
else()
MATH(EXPR QT_MSVC "2000 + (${MSVC_VERSION} - 600) / 100")
endif()
# check for 64-bit os
# may need to be removed for older compilers as it wasn't always offered
IF(CMAKE_SYSTEM_PROCESSOR MATCHES 64)
SET(QT_MSVC "${QT_MSVC}_64")
ENDIF()
SET(QT_PATH "${QT_VERSION}/msvc${QT_MSVC}")
SET(QT_MISSING False)
ENDIF()
# use Qt_DIR approach so you can find Qt after cmake has been invoked
IF(NOT QT_MISSING)
MESSAGE("-- Qt found: ${QT_PATH}")
SET(Qt5_DIR "${QT_PATH}/lib/cmake/Qt5/")
SET(Qt5Test_DIR "${QT_PATH}/lib/cmake/Qt5Test")
ENDIF()

21
cmake/ci/build_sdrangel.sh Normal file → Executable file
View File

@ -1,26 +1,17 @@
#!/bin/sh #!/bin/sh -e
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
JOBS=$(sysctl -n hw.ncpu)
elif [ "${TRAVIS_OS_NAME}" == "linux" ] || [ ${CI_LINUX} = true ]; then
JOBS=$(nproc --all)
else
JOBS=1
fi
if [ "${TRAVIS_OS_NAME}" == "linux" ] || [ ${CI_LINUX} = true ]; then if [ "${TRAVIS_OS_NAME}" == "linux" ] || [ ${CI_LINUX} = true ]; then
debuild -i -us -uc -b debuild -i -us -uc -b
else else
mkdir build && cd build mkdir -p build; cd build
cmake .. "${CMAKE_CUSTOM_OPTIONS}" cmake .. -GNinja ${CMAKE_CUSTOM_OPTIONS}
case "${CMAKE_CUSTOM_OPTIONS}" in case "${CMAKE_CUSTOM_OPTIONS}" in
*BUNDLE=ON*) *BUNDLE=ON*)
make -j${JOBS} package cmake --build . --target package
;; ;;
*) *)
make -j${JOBS} cmake --build .
;; ;;
esac esac
fi fi

12
debian/changelog vendored
View File

@ -1,3 +1,15 @@
sdrangel (4.21.2-1) unstable; urgency=medium
* Windows package: upgrade to VS 2019 and Qt 5.15.1. PR #683
* Package builds: migrate to Ninja. PR #683
* Define _USE_MATH_DEFINES and clean M_PI redefinitions. PR #682
* NFM Demod: Refactored audio scaling. PR #682 + fix
* NFM Demod: Fix CTCSS check logic: PR #682
* NFM: review frequency deviation
* KiwiSDR: fixed issue in local network. Fixes #435
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Fri, 06 Nov 2020 05:21:24 +0100
sdrangel (4.21.1-1) unstable; urgency=medium sdrangel (4.21.1-1) unstable; urgency=medium
* ADS-B demod: optimization of sync word correlation. Implements #675 * ADS-B demod: optimization of sync word correlation. Implements #675

7
debian/rules vendored
View File

@ -1,10 +1,13 @@
#!/usr/bin/make -f #!/usr/bin/make -f
%: %:
dh $@ --parallel dh $@ --parallel --buildsystem=cmake+ninja
# FORCE_SSE41 will be not accepted upstream # FORCE_SSE41 will be not accepted upstream
override_dh_auto_configure: override_dh_auto_configure:
dh_auto_configure -- -DFORCE_SSE41=ON -DENABLE_EXTERNAL_LIBRARIES=ON -DDEBUG_OUTPUT=ON dh_auto_configure -- -DFORCE_SSE41=ON -DENABLE_EXTERNAL_LIBRARIES=ON -DDEBUG_OUTPUT=ON -DBUILD_SERVER=OFF
override_dh_auto_test:
echo "Skipping test step"
# permit the packaging with /usr/local/lib libraries (from `make install`) # permit the packaging with /usr/local/lib libraries (from `make install`)
# you can also use `export DEB_DH_SHLIBDEPS_ARGS_ALL=--dpkg-shlibdeps-params=--ignore-missing-info` # you can also use `export DEB_DH_SHLIBDEPS_ARGS_ALL=--dpkg-shlibdeps-params=--ignore-missing-info`

View File

@ -1,8 +1,3 @@
if(WIN32)
# ${Boost_LIBRARY_DIRS} is empty on windows
link_directories(${BOOST_LIBRARYDIR})
endif()
project(usrpdevice) project(usrpdevice)
@ -30,10 +25,13 @@ add_library(usrpdevice SHARED
set_target_properties(usrpdevice set_target_properties(usrpdevice
PROPERTIES DEFINE_SYMBOL "devices_EXPORTS") PROPERTIES DEFINE_SYMBOL "devices_EXPORTS")
link_directories(${Boost_LIBRARY_DIRS}) if (NOT WIN32)
link_directories(${Boost_LIBRARY_DIRS})
endif()
target_link_libraries(usrpdevice target_link_libraries(usrpdevice
${UHD_LIBRARIES} ${UHD_LIBRARIES}
Boost::disable_autolinking
sdrbase sdrbase
) )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

View File

@ -10,7 +10,7 @@
# which version/tag/checkout to use # which version/tag/checkout to use
set(CODEC2_TAG "v0.9.2") set(CODEC2_TAG "v0.9.2")
set(CM256CC_TAG c0e92b92aca3d1d36c990b642b937c64d363c559) set(CM256CC_TAG c0e92b92aca3d1d36c990b642b937c64d363c559)
set(MBELIB_TAG 9a04ed5c78176a9965f3d43f7aa1b1f5330e771f) set(MBELIB_TAG fe83b32c6a60cdd7bce8cecf3c7a0b9ec87a7667)
set(SERIALDV_TAG "v1.1.4") set(SERIALDV_TAG "v1.1.4")
set(DSDCC_TAG "v1.9.0") set(DSDCC_TAG "v1.9.0")
set(LIMESUITE_TAG "v20.01.0") set(LIMESUITE_TAG "v20.01.0")
@ -37,7 +37,7 @@ include(ExternalProject)
# default build destination in windows to avoid Release/Debug folder # default build destination in windows to avoid Release/Debug folder
if (WIN32) if (WIN32)
# the build will be output on the same folder of sdrangel # the build will be output on the same folder of sdrangel
set(DEFAULT_OUTPUT_DIRECTORIES set(COMMON_CMAKE_ARGS
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${SDRANGEL_BINARY_BIN_DIR} -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${SDRANGEL_BINARY_BIN_DIR}
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=${SDRANGEL_BINARY_BIN_DIR} -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=${SDRANGEL_BINARY_BIN_DIR}
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=${SDRANGEL_BINARY_BIN_DIR} -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=${SDRANGEL_BINARY_BIN_DIR}
@ -52,7 +52,7 @@ if (WIN32)
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO=${SDRANGEL_BINARY_LIB_DIR} -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO=${SDRANGEL_BINARY_LIB_DIR}
) )
elseif (LINUX) elseif (LINUX)
set(DEFAULT_OUTPUT_DIRECTORIES set(COMMON_CMAKE_ARGS
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${EXTERNAL_BUILD_LIBRARIES}/bin -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${EXTERNAL_BUILD_LIBRARIES}/bin
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=${EXTERNAL_BUILD_LIBRARIES}/bin -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=${EXTERNAL_BUILD_LIBRARIES}/bin
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=${EXTERNAL_BUILD_LIBRARIES}/bin -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=${EXTERNAL_BUILD_LIBRARIES}/bin
@ -68,6 +68,19 @@ elseif (LINUX)
) )
endif () endif ()
if(CMAKE_MSVC_RUNTIME_LIBRARY)
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_POLICY_DEFAULT_CMP0091:STRING=NEW)
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_MSVC_RUNTIME_LIBRARY=${CMAKE_MSVC_RUNTIME_LIBRARY})
endif()
if(CMAKE_BUILD_TYPE)
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
endif()
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD})
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_STANDARD_REQUIRED=${CMAKE_CXX_STANDARD_REQUIRED})
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS})
if (LINUX) if (LINUX)
# macro that create symbolic links # macro that create symbolic links
macro(makeLink src dest target) macro(makeLink src dest target)
@ -159,11 +172,17 @@ endif (AUTO_EXTERNAL_LIBRARIES)
if (NOT WIN32 AND (NOT CODEC2_FOUND OR CODEC2_EXTERNAL)) if (NOT WIN32 AND (NOT CODEC2_FOUND OR CODEC2_EXTERNAL))
# needs speexdsp # needs speexdsp
if (WIN32)
set(CODEC2_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/codec2.lib" CACHE INTERNAL "")
elseif (LINUX)
set(CODEC2_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libcodec2${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
endif ()
ExternalProject_Add(codec2 ExternalProject_Add(codec2
GIT_REPOSITORY https://github.com/drowe67/codec2.git GIT_REPOSITORY https://github.com/drowe67/codec2.git
GIT_TAG ${CODEC2_TAG} GIT_TAG ${CODEC2_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/codec2" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/codec2"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS ${COMMON_CMAKE_ARGS}
BUILD_BYPRODUCTS "${CODEC2_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -186,16 +205,22 @@ endif (NOT WIN32 AND (NOT CODEC2_FOUND OR CODEC2_EXTERNAL))
if (NOT APPLE AND (NOT CM256CC_FOUND OR CM256CC_EXTERNAL)) if (NOT APPLE AND (NOT CM256CC_FOUND OR CM256CC_EXTERNAL))
# needs boost # needs boost
if (WIN32)
set(CM256CC_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/cm256cc.lib" CACHE INTERNAL "")
elseif (LINUX)
set(CM256CC_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libcm256cc${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
endif ()
string(REPLACE ";" "|" CMAKE_PREFIX_PATH_SEP "${CMAKE_PREFIX_PATH}")
ExternalProject_Add(cm256cc ExternalProject_Add(cm256cc
GIT_REPOSITORY https://github.com/f4exb/cm256cc.git GIT_REPOSITORY https://github.com/f4exb/cm256cc.git
GIT_TAG ${CM256CC_TAG} GIT_TAG ${CM256CC_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/cm256cc" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/cm256cc"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} LIST_SEPARATOR |
CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DBUILD_TOOLS=OFF -DBUILD_TOOLS=OFF
-DBOOST_ROOT="${BOOST_ROOT}" -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH_SEP}
-DBoost_INCLUDE_DIR=${Boost_INCLUDE_DIRS}
-DBoost_INCLUDE_DIRS=${Boost_INCLUDE_DIRS}
-DENABLE_DISTRIBUTION=ON -DENABLE_DISTRIBUTION=ON
BUILD_BYPRODUCTS "${CM256CC_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -205,10 +230,7 @@ if (NOT APPLE AND (NOT CM256CC_FOUND OR CM256CC_EXTERNAL))
# we need cm256cc/library.h # we need cm256cc/library.h
set(CM256CC_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/cm256cc/src" CACHE INTERNAL "") set(CM256CC_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/cm256cc/src" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(CM256CC_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/cm256cc.lib" CACHE INTERNAL "")
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/cm256cc${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/cm256cc${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (LINUX)
set(CM256CC_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libcm256cc${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
elseif (APPLE) # kept in case of relaxation of APPLE exclusion elseif (APPLE) # kept in case of relaxation of APPLE exclusion
set(CM256CC_LIBRARIES "${binary_dir}/libcm256cc${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") set(CM256CC_LIBRARIES "${binary_dir}/libcm256cc${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
install(DIRECTORY "${binary_dir}/" DESTINATION "${INSTALL_LIB_DIR}" install(DIRECTORY "${binary_dir}/" DESTINATION "${INSTALL_LIB_DIR}"
@ -219,11 +241,17 @@ endif (NOT APPLE AND (NOT CM256CC_FOUND OR CM256CC_EXTERNAL))
if ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND (NOT LIBMBE_FOUND OR LIBMBE_EXTERNAL)) if ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND (NOT LIBMBE_FOUND OR LIBMBE_EXTERNAL))
set(USE_MBELIB OFF) set(USE_MBELIB OFF)
if (WIN32)
set(LIBMBE_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/libmbe.lib" CACHE INTERNAL "")
elseif (LINUX)
set(LIBMBE_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libmbe${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
endif ()
ExternalProject_Add(mbelib ExternalProject_Add(mbelib
GIT_REPOSITORY https://github.com/szechyjs/mbelib.git GIT_REPOSITORY https://github.com/kasper93/mbelib.git
GIT_TAG ${MBELIB_TAG} GIT_TAG ${MBELIB_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/mbelib" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/mbelib"
CMAKE_ARGS -DDISABLE_TEST=ON ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS -DDISABLE_TEST=ON ${COMMON_CMAKE_ARGS}
BUILD_BYPRODUCTS "${LIBMBE_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -234,10 +262,7 @@ if ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND (NOT LIBMBE_FOUND OR LIBMBE_EX
set(LIBMBE_EXTERNAL ON CACHE INTERNAL "") set(LIBMBE_EXTERNAL ON CACHE INTERNAL "")
set(LIBMBE_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "") set(LIBMBE_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIBMBE_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/mbe.lib" CACHE INTERNAL "") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/libmbe${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/mbe${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (LINUX)
set(LIBMBE_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libmbe${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
elseif (APPLE) elseif (APPLE)
set(LIBMBE_LIBRARIES "${binary_dir}/libmbe${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") set(LIBMBE_LIBRARIES "${binary_dir}/libmbe${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
install(DIRECTORY "${binary_dir}/" DESTINATION "${INSTALL_LIB_DIR}" install(DIRECTORY "${binary_dir}/" DESTINATION "${INSTALL_LIB_DIR}"
@ -248,12 +273,17 @@ endif ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND (NOT LIBMBE_FOUND OR LIBMBE
if (NOT LIBSERIALDV_FOUND OR LIBSERIALDV_EXTERNAL) if (NOT LIBSERIALDV_FOUND OR LIBSERIALDV_EXTERNAL)
# Works on MacOS with a dummy serialDV # Works on MacOS with a dummy serialDV
if (WIN32)
set(LIBSERIALDV_LIBRARY "${SDRANGEL_BINARY_LIB_DIR}/serialdv.lib" CACHE INTERNAL "")
elseif (LINUX)
set(LIBSERIALDV_LIBRARY "${EXTERNAL_BUILD_LIBRARIES}/lib/libserialdv${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
endif ()
ExternalProject_Add(serialdv ExternalProject_Add(serialdv
GIT_REPOSITORY https://github.com/f4exb/serialDV.git GIT_REPOSITORY https://github.com/f4exb/serialDV.git
GIT_TAG ${SERIALDV_TAG} GIT_TAG ${SERIALDV_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/serialdv" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/serialdv"
CMAKE_ARGS -DBUILD_TOOL=OFF ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS -DBUILD_TOOL=OFF ${COMMON_CMAKE_ARGS}
INSTALL_COMMAND "" BUILD_BYPRODUCTS "${LIBSERIALDV_LIBRARY}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -263,11 +293,9 @@ if (NOT LIBSERIALDV_FOUND OR LIBSERIALDV_EXTERNAL)
set(LIBSERIALDV_EXTERNAL ON CACHE INTERNAL "") set(LIBSERIALDV_EXTERNAL ON CACHE INTERNAL "")
set(LIBSERIALDV_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "") set(LIBSERIALDV_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIBSERIALDV_LIBRARY "${SDRANGEL_BINARY_LIB_DIR}/serialdv.lib" CACHE INTERNAL "")
makeCopyDir("${source_dir}" "${source_dir}/dsp" serialdv) makeCopyDir("${source_dir}" "${source_dir}/dsp" serialdv)
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/serialdv${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/serialdv${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (LINUX) elseif (LINUX)
set(LIBSERIALDV_LIBRARY "${EXTERNAL_BUILD_LIBRARIES}/lib/libserialdv${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
# because sdrbase/dsp/dvserialworker.h use dsp/dvcontroller.h # because sdrbase/dsp/dvserialworker.h use dsp/dvcontroller.h
# so we need a link # so we need a link
makeLink("${source_dir}" "${source_dir}/dsp" serialdv) makeLink("${source_dir}" "${source_dir}/dsp" serialdv)
@ -283,17 +311,23 @@ if (NOT LIBSERIALDV_FOUND OR LIBSERIALDV_EXTERNAL)
endif (NOT LIBSERIALDV_FOUND OR LIBSERIALDV_EXTERNAL) endif (NOT LIBSERIALDV_FOUND OR LIBSERIALDV_EXTERNAL)
if ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND LIBMBE_FOUND) if ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND LIBMBE_FOUND)
if (WIN32)
set(LIBDSDCC_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/dsdcc.lib" CACHE INTERNAL "")
elseif (LINUX)
set(LIBDSDCC_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libdsdcc${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
endif ()
ExternalProject_Add(dsdcc ExternalProject_Add(dsdcc
GIT_REPOSITORY https://github.com/f4exb/dsdcc.git GIT_REPOSITORY https://github.com/f4exb/dsdcc.git
GIT_TAG ${DSDCC_TAG} GIT_TAG ${DSDCC_TAG}
DEPENDS ${DSDCC_DEPENDS} DEPENDS ${DSDCC_DEPENDS}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/dsdcc" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/dsdcc"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DBUILD_TOOL=OFF -DUSE_MBELIB=${USE_MBELIB} -DBUILD_TOOL=OFF -DUSE_MBELIB=${USE_MBELIB}
-DLIBMBE_INCLUDE_DIR=${LIBMBE_INCLUDE_DIR} -DLIBMBE_INCLUDE_DIR=${LIBMBE_INCLUDE_DIR}
-DLIBMBE_LIBRARY=${LIBMBE_LIBRARIES} -DLIBMBE_LIBRARY=${LIBMBE_LIBRARIES}
-DLIBSERIALDV_INCLUDE_DIR=${LIBSERIALDV_INCLUDE_DIR} -DLIBSERIALDV_INCLUDE_DIR=${LIBSERIALDV_INCLUDE_DIR}
-DLIBSERIALDV_LIBRARY=${LIBSERIALDV_LIBRARY} -DLIBSERIALDV_LIBRARY=${LIBSERIALDV_LIBRARY}
BUILD_BYPRODUCTS "${LIBDSDCC_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -302,10 +336,7 @@ if ((NOT LIBDSDCC_FOUND OR LIBDSDCC_EXTERNAL) AND LIBMBE_FOUND)
set(LIBDSDCC_EXTERNAL ON CACHE INTERNAL "") set(LIBDSDCC_EXTERNAL ON CACHE INTERNAL "")
set(LIBDSDCC_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/dsdcc/src" CACHE INTERNAL "") set(LIBDSDCC_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/dsdcc/src" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIBDSDCC_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/dsdcc.lib" CACHE INTERNAL "")
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/dsdcc${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/dsdcc${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (LINUX)
set(LIBDSDCC_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libdsdcc${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
elseif (APPLE) elseif (APPLE)
set(LIBDSDCC_LIBRARIES "${binary_dir}/libdsdcc${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") set(LIBDSDCC_LIBRARIES "${binary_dir}/libdsdcc${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
install(DIRECTORY "${binary_dir}/" DESTINATION "${INSTALL_LIB_DIR}" install(DIRECTORY "${binary_dir}/" DESTINATION "${INSTALL_LIB_DIR}"
@ -344,134 +375,142 @@ if (LINUX)
# apt install liblimesuite-dev (only on ubuntu 18.04). Can be picky on version though so let's build it. # apt install liblimesuite-dev (only on ubuntu 18.04). Can be picky on version though so let's build it.
# needs pkgconfig and libusb # needs pkgconfig and libusb
if (NOT LIMESUITE_FOUND OR LIMESUITE_EXTERNAL) if (NOT LIMESUITE_FOUND OR LIMESUITE_EXTERNAL)
ExternalProject_Add(limesuite
GIT_REPOSITORY https://github.com/myriadrf/LimeSuite.git
GIT_TAG ${LIMESUITE_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/limesuite"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} -DLIME_SUITE_EXTVER=release -DENABLE_GUI=OFF -DENABLE_NOVENARF7=OFF -DENABLE_SOAPY_LMS7=OFF -DENABLE_OCTAVE=OFF -DENABLE_SIMD_FLAGS=SSE3
INSTALL_COMMAND ""
TEST_COMMAND ""
)
ExternalProject_Get_Property(limesuite source_dir)
set(LIMESUITE_FOUND ON CACHE INTERNAL "") set(LIMESUITE_FOUND ON CACHE INTERNAL "")
set(LIMESUITE_EXTERNAL ON CACHE INTERNAL "") set(LIMESUITE_EXTERNAL ON CACHE INTERNAL "")
set(LIMESUITE_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/limesuite/src/limesuite/src" CACHE INTERNAL "") set(LIMESUITE_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/limesuite/src/limesuite/src" CACHE INTERNAL "")
set(LIMESUITE_LIBRARY "${EXTERNAL_BUILD_LIBRARIES}/lib/libLimeSuite.so" CACHE INTERNAL "") set(LIMESUITE_LIBRARY "${EXTERNAL_BUILD_LIBRARIES}/lib/libLimeSuite.so" CACHE INTERNAL "")
ExternalProject_Add(limesuite
GIT_REPOSITORY https://github.com/myriadrf/LimeSuite.git
GIT_TAG ${LIMESUITE_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/limesuite"
CMAKE_ARGS ${COMMON_CMAKE_ARGS} -DLIME_SUITE_EXTVER=release -DENABLE_GUI=OFF -DENABLE_NOVENARF7=OFF -DENABLE_SOAPY_LMS7=OFF -DENABLE_OCTAVE=OFF -DENABLE_SIMD_FLAGS=SSE3
BUILD_BYPRODUCTS "${LIMESUITE_LIBRARY}"
INSTALL_COMMAND ""
TEST_COMMAND ""
)
ExternalProject_Get_Property(limesuite source_dir)
makeCopyFile("${source_dir}/src/limeRFE/limeRFE.h" "${source_dir}/src/lime/limeRFE.h" limesuite) makeCopyFile("${source_dir}/src/limeRFE/limeRFE.h" "${source_dir}/src/lime/limeRFE.h" limesuite)
endif (NOT LIMESUITE_FOUND OR LIMESUITE_EXTERNAL) endif (NOT LIMESUITE_FOUND OR LIMESUITE_EXTERNAL)
# apt install libbladerf-dev # apt install libbladerf-dev
# needs pkgconfig and libusb # needs pkgconfig and libusb
if (NOT LIBBLADERF_FOUND OR LIBBLADERF_EXTERNAL) if (NOT LIBBLADERF_FOUND OR LIBBLADERF_EXTERNAL)
set(LIBBLADERF_FOUND ON CACHE INTERNAL "")
set(LIBBLADERF_EXTERNAL ON CACHE INTERNAL "")
set(LIBBLADERF_INCLUDE_DIRS "${EXTERNAL_BUILD_LIBRARIES}/bladerf/src/bladerf/host/libraries/libbladeRF/include" CACHE INTERNAL "")
set(LIBBLADERF_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/bladerf/src/bladerf-build/output/libbladeRF.so.2" CACHE INTERNAL "")
ExternalProject_Add(bladerf ExternalProject_Add(bladerf
GIT_REPOSITORY https://github.com/Nuand/bladeRF.git GIT_REPOSITORY https://github.com/Nuand/bladeRF.git
GIT_TAG ${BLADERF_TAG} GIT_TAG ${BLADERF_TAG}
GIT_SUBMODULES GIT_SUBMODULES
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/bladerf" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/bladerf"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS ${COMMON_CMAKE_ARGS}
SOURCE_SUBDIR host/ SOURCE_SUBDIR host/
BUILD_BYPRODUCTS "${LIBBLADERF_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
set(LIBBLADERF_FOUND ON CACHE INTERNAL "") install(FILES "${LIBBLADERF_LIBRARIES}" DESTINATION "${INSTALL_LIB_DIR}")
set(LIBBLADERF_EXTERNAL ON CACHE INTERNAL "")
set(LIBBLADERF_INCLUDE_DIRS "${EXTERNAL_BUILD_LIBRARIES}/bladerf/src/bladerf/host/libraries/libbladeRF/include" CACHE INTERNAL "")
set(LIBBLADERF_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libbladeRF.so" CACHE INTERNAL "")
endif (NOT LIBBLADERF_FOUND OR LIBBLADERF_EXTERNAL) endif (NOT LIBBLADERF_FOUND OR LIBBLADERF_EXTERNAL)
# apt install libiio-dev # apt install libiio-dev
# needs pkgconfig, libusb, libxml2, lzma, xz, libiconv # needs pkgconfig, libusb, libxml2, lzma, xz, libiconv
if (NOT LIBIIO_FOUND OR LIBIIO_EXTERNAL) if (NOT LIBIIO_FOUND OR LIBIIO_EXTERNAL)
ExternalProject_Add(libiio
GIT_REPOSITORY https://github.com/analogdevicesinc/libiio.git
GIT_TAG ${LIBIIO_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/libiio"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} -DOSX_PACKAGE=OFF -DWITH_DOC=OFF
INSTALL_COMMAND ""
TEST_COMMAND ""
)
set(LIBIIO_FOUND ON CACHE INTERNAL "") set(LIBIIO_FOUND ON CACHE INTERNAL "")
set(LIBIIO_EXTERNAL ON CACHE INTERNAL "") set(LIBIIO_EXTERNAL ON CACHE INTERNAL "")
set(LIBIIO_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/libiio/src/libiio" CACHE INTERNAL "") set(LIBIIO_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/libiio/src/libiio" CACHE INTERNAL "")
set(LIBIIO_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libiio.so" CACHE INTERNAL "") set(LIBIIO_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libiio.so" CACHE INTERNAL "")
ExternalProject_Add(libiio
GIT_REPOSITORY https://github.com/analogdevicesinc/libiio.git
GIT_TAG ${LIBIIO_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/libiio"
CMAKE_ARGS ${COMMON_CMAKE_ARGS} -DOSX_PACKAGE=OFF -DWITH_DOC=OFF
BUILD_BYPRODUCTS "${LIBIIO_LIBRARIES}"
INSTALL_COMMAND ""
TEST_COMMAND ""
)
endif (NOT LIBIIO_FOUND OR LIBIIO_EXTERNAL) endif (NOT LIBIIO_FOUND OR LIBIIO_EXTERNAL)
# apt install libairspyhf-dev (only on ubuntu 18.04) # apt install libairspyhf-dev (only on ubuntu 18.04)
# needs libusb and pkgconfig # needs libusb and pkgconfig
if (NOT LIBAIRSPYHF_FOUND OR LIBAIRSPYHF_EXTERNAL) if (NOT LIBAIRSPYHF_FOUND OR LIBAIRSPYHF_EXTERNAL)
set(LIBAIRSPYHF_FOUND ON CACHE INTERNAL "")
set(LIBAIRSPYHF_EXTERNAL ON CACHE INTERNAL "")
set(LIBAIRSPYHF_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libairspyhf.so" CACHE INTERNAL "")
ExternalProject_Add(airspyhf ExternalProject_Add(airspyhf
GIT_REPOSITORY https://github.com/airspy/airspyhf.git GIT_REPOSITORY https://github.com/airspy/airspyhf.git
GIT_TAG ${AIRSPYHF_TAG} GIT_TAG ${AIRSPYHF_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/airspyhf" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/airspyhf"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS ${COMMON_CMAKE_ARGS}
BUILD_BYPRODUCTS "${LIBAIRSPYHF_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
ExternalProject_Get_Property(airspyhf source_dir) ExternalProject_Get_Property(airspyhf source_dir)
set(LIBAIRSPYHF_FOUND ON CACHE INTERNAL "")
set(LIBAIRSPYHF_EXTERNAL ON CACHE INTERNAL "")
set(LIBAIRSPYHF_INCLUDE_DIR "${source_dir}/.." CACHE INTERNAL "") set(LIBAIRSPYHF_INCLUDE_DIR "${source_dir}/.." CACHE INTERNAL "")
set(LIBAIRSPYHF_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libairspyhf.so" CACHE INTERNAL "")
makeLink("${source_dir}/libairspyhf/src" "${source_dir}/../libairspyhf" airspyhf) makeLink("${source_dir}/libairspyhf/src" "${source_dir}/../libairspyhf" airspyhf)
endif (NOT LIBAIRSPYHF_FOUND OR LIBAIRSPYHF_EXTERNAL) endif (NOT LIBAIRSPYHF_FOUND OR LIBAIRSPYHF_EXTERNAL)
# needs pkgconfig, libusb, autoconf, automake and libtool # needs pkgconfig, libusb, autoconf, automake and libtool
if (NOT LIBPERSEUS_FOUND OR LIBPERSEUS_EXTERNAL) if (NOT LIBPERSEUS_FOUND OR LIBPERSEUS_EXTERNAL)
ExternalProject_Add(perseus
GIT_REPOSITORY https://github.com/f4exb/libperseus-sdr.git
GIT_TAG ${PERSEUS_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/perseus"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES}
INSTALL_COMMAND ""
TEST_COMMAND ""
)
set(LIBPERSEUS_FOUND ON CACHE INTERNAL "") set(LIBPERSEUS_FOUND ON CACHE INTERNAL "")
set(LIBPERSEUS_EXTERNAL ON CACHE INTERNAL "") set(LIBPERSEUS_EXTERNAL ON CACHE INTERNAL "")
set(LIBPERSEUS_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/perseus/src/perseus" CACHE INTERNAL "") set(LIBPERSEUS_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/perseus/src/perseus" CACHE INTERNAL "")
set(LIBPERSEUS_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libperseus-sdr.so" CACHE INTERNAL "") set(LIBPERSEUS_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libperseus-sdr.so" CACHE INTERNAL "")
ExternalProject_Add(perseus
GIT_REPOSITORY https://github.com/f4exb/libperseus-sdr.git
GIT_TAG ${PERSEUS_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/perseus"
CMAKE_ARGS ${COMMON_CMAKE_ARGS}
BUILD_BYPRODUCTS "${LIBPERSEUS_LIBRARIES}"
INSTALL_COMMAND ""
TEST_COMMAND ""
)
endif (NOT LIBPERSEUS_FOUND OR LIBPERSEUS_EXTERNAL) endif (NOT LIBPERSEUS_FOUND OR LIBPERSEUS_EXTERNAL)
# apt install librtlsdr-dev # apt install librtlsdr-dev
# needs pkgconfig and libusb # needs pkgconfig and libusb
if (NOT LIBRTLSDR_FOUND OR LIBRTLSDR_EXTERNAL) if (NOT LIBRTLSDR_FOUND OR LIBRTLSDR_EXTERNAL)
ExternalProject_Add(rtlsdr
GIT_REPOSITORY https://github.com/osmocom/rtl-sdr.git
GIT_TAG ${RTLSDR_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/rtlsdr"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} -DDETACH_KERNEL_DRIVER=ON -DINSTALL_UDEV_RULES=${RTLSDR_UDEV}
INSTALL_COMMAND ""
TEST_COMMAND ""
)
set(LIBRTLSDR_FOUND ON CACHE INTERNAL "") set(LIBRTLSDR_FOUND ON CACHE INTERNAL "")
set(LIBRTLSDR_EXTERNAL ON CACHE INTERNAL "") set(LIBRTLSDR_EXTERNAL ON CACHE INTERNAL "")
set(LIBRTLSDR_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/rtlsdr/src/rtlsdr/include" CACHE INTERNAL "") set(LIBRTLSDR_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/rtlsdr/src/rtlsdr/include" CACHE INTERNAL "")
set(LIBRTLSDR_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/librtlsdr.so" CACHE INTERNAL "") set(LIBRTLSDR_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/librtlsdr.so" CACHE INTERNAL "")
ExternalProject_Add(rtlsdr
GIT_REPOSITORY https://github.com/osmocom/rtl-sdr.git
GIT_TAG ${RTLSDR_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/rtlsdr"
CMAKE_ARGS ${COMMON_CMAKE_ARGS} -DDETACH_KERNEL_DRIVER=ON -DINSTALL_UDEV_RULES=${RTLSDR_UDEV}
BUILD_BYPRODUCTS "${LIBRTLSDR_LIBRARIES}"
INSTALL_COMMAND ""
TEST_COMMAND ""
)
endif (NOT LIBRTLSDR_FOUND OR LIBRTLSDR_EXTERNAL) endif (NOT LIBRTLSDR_FOUND OR LIBRTLSDR_EXTERNAL)
# needs pkgconfig and libusb # needs pkgconfig and libusb
if (NOT LIBMIRISDR_FOUND OR LIBMIRISDR_EXTERNAL) if (NOT LIBMIRISDR_FOUND OR LIBMIRISDR_EXTERNAL)
ExternalProject_Add(libmirisdr
GIT_REPOSITORY https://github.com/f4exb/libmirisdr-4.git
GIT_TAG ${MIRISDR_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/libmirisdr"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES}
INSTALL_COMMAND ""
TEST_COMMAND ""
)
set(LIBMIRISDR_FOUND ON CACHE INTERNAL "") set(LIBMIRISDR_FOUND ON CACHE INTERNAL "")
set(LIBMIRISDR_EXTERNAL ON CACHE INTERNAL "") set(LIBMIRISDR_EXTERNAL ON CACHE INTERNAL "")
set(LIBMIRISDR_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/libmirisdr/src/libmirisdr/include" CACHE INTERNAL "") set(LIBMIRISDR_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/libmirisdr/src/libmirisdr/include" CACHE INTERNAL "")
set(LIBMIRISDR_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libmirisdr.so" CACHE INTERNAL "") set(LIBMIRISDR_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib/libmirisdr.so" CACHE INTERNAL "")
ExternalProject_Add(libmirisdr
GIT_REPOSITORY https://github.com/f4exb/libmirisdr-4.git
GIT_TAG ${MIRISDR_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/libmirisdr"
CMAKE_ARGS ${COMMON_CMAKE_ARGS}
BUILD_BYPRODUCTS "${LIBMIRISDR_LIBRARIES}"
INSTALL_COMMAND ""
TEST_COMMAND ""
)
endif (NOT LIBMIRISDR_FOUND OR LIBMIRISDR_EXTERNAL) endif (NOT LIBMIRISDR_FOUND OR LIBMIRISDR_EXTERNAL)
endif (LINUX) endif (LINUX)
if (WIN32 OR APPLE) if (WIN32 OR APPLE)
if (ENABLE_RTLSDR) if (ENABLE_RTLSDR)
set(RTLSDR_LIBUSB_INCLUDE "${LIBUSB_INCLUDE_DIR}")
if (WIN32) if (WIN32)
set(LIBRTLSDR_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/rtlsdr.lib" CACHE INTERNAL "")
set(RTLSDR_LIBUSB_INCLUDE "${LIBUSB_INCLUDE_DIR}/libusb-1.0") set(RTLSDR_LIBUSB_INCLUDE "${LIBUSB_INCLUDE_DIR}/libusb-1.0")
else ()
set(RTLSDR_LIBUSB_INCLUDE "${LIBUSB_INCLUDE_DIR}")
endif () endif ()
# needs pkgconfig and libusb # needs pkgconfig and libusb
ExternalProject_Add(rtlsdr ExternalProject_Add(rtlsdr
@ -479,12 +518,13 @@ if (WIN32 OR APPLE)
GIT_TAG ${RTLSDR_TAG} GIT_TAG ${RTLSDR_TAG}
DEPENDS ${PTHREADS4W_DEPENDS} DEPENDS ${PTHREADS4W_DEPENDS}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/rtlsdr" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/rtlsdr"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DINSTALL_UDEV_RULES=${RTLSDR_UDEV} -DINSTALL_UDEV_RULES=${RTLSDR_UDEV}
-DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES} -DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES}
-DLIBUSB_INCLUDE_DIR=${RTLSDR_LIBUSB_INCLUDE} -DLIBUSB_INCLUDE_DIR=${RTLSDR_LIBUSB_INCLUDE}
-DTHREADS_PTHREADS_INCLUDE_DIR=${PTHREADS4W_INCLUDE_DIR} -DTHREADS_PTHREADS_INCLUDE_DIR=${PTHREADS4W_INCLUDE_DIR}
-DTHREADS_PTHREADS_WIN32_LIBRARY=${PTHREADS4W_LIBRARIES} -DTHREADS_PTHREADS_WIN32_LIBRARY=${PTHREADS4W_LIBRARIES}
BUILD_BYPRODUCTS "${LIBRTLSDR_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -493,7 +533,6 @@ if (WIN32 OR APPLE)
set(LIBRTLSDR_EXTERNAL ON CACHE INTERNAL "") set(LIBRTLSDR_EXTERNAL ON CACHE INTERNAL "")
set(LIBRTLSDR_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "") set(LIBRTLSDR_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIBRTLSDR_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/rtlsdr.lib" CACHE INTERNAL "")
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/rtlsdr${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/rtlsdr${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (APPLE) elseif (APPLE)
set(LIBRTLSDR_LIBRARIES "${binary_dir}/src/librtlsdr${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") set(LIBRTLSDR_LIBRARIES "${binary_dir}/src/librtlsdr${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
@ -505,11 +544,14 @@ if (WIN32 OR APPLE)
if (ENABLE_LIMESUITE) if (ENABLE_LIMESUITE)
# needs pkgconfig, libusb # needs pkgconfig, libusb
if (WIN32)
set(LIMESUITE_LIBRARY "${SDRANGEL_BINARY_LIB_DIR}/LimeSuite.lib" CACHE INTERNAL "")
endif ()
ExternalProject_Add(limesuite ExternalProject_Add(limesuite
GIT_REPOSITORY https://github.com/myriadrf/LimeSuite.git GIT_REPOSITORY https://github.com/myriadrf/LimeSuite.git
GIT_TAG ${LIMESUITE_TAG} GIT_TAG ${LIMESUITE_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/limesuite" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/limesuite"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DLIME_SUITE_EXTVER=release -DLIME_SUITE_EXTVER=release
-DENABLE_GUI=OFF -DENABLE_GUI=OFF
-DENABLE_NOVENARF7=OFF -DENABLE_NOVENARF7=OFF
@ -519,6 +561,7 @@ if (WIN32 OR APPLE)
-DENABLE_EXAMPLES=OFF -DENABLE_EXAMPLES=OFF
-DENABLE_SIMD_FLAGS=SSE3 -DENABLE_SIMD_FLAGS=SSE3
-DFX3_SDK_PATH=${FX3SDK_DIR} -DFX3_SDK_PATH=${FX3SDK_DIR}
BUILD_BYPRODUCTS "${LIMESUITE_LIBRARY}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -527,7 +570,6 @@ if (WIN32 OR APPLE)
set(LIMESUITE_EXTERNAL ON CACHE INTERNAL "") set(LIMESUITE_EXTERNAL ON CACHE INTERNAL "")
set(LIMESUITE_INCLUDE_DIR "${source_dir}/src" CACHE INTERNAL "") set(LIMESUITE_INCLUDE_DIR "${source_dir}/src" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIMESUITE_LIBRARY "${SDRANGEL_BINARY_LIB_DIR}/LimeSuite.lib" CACHE INTERNAL "")
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/LimeSuite${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/LimeSuite${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
makeCopy("${source_dir}/src/limeRFE/limeRFE.h" "${source_dir}/src/lime/limeRFE.h" limesuite) makeCopy("${source_dir}/src/limeRFE/limeRFE.h" "${source_dir}/src/lime/limeRFE.h" limesuite)
elseif (APPLE) elseif (APPLE)
@ -539,14 +581,18 @@ if (WIN32 OR APPLE)
endif (ENABLE_LIMESUITE) endif (ENABLE_LIMESUITE)
if (ENABLE_SOAPYSDR) if (ENABLE_SOAPYSDR)
if (WIN32)
set(SOAPYSDR_LIBRARY "${SDRANGEL_BINARY_LIB_DIR}/SoapySDR.lib" CACHE INTERNAL "")
endif ()
ExternalProject_Add(soapysdr ExternalProject_Add(soapysdr
GIT_REPOSITORY https://github.com/pothosware/SoapySDR.git GIT_REPOSITORY https://github.com/pothosware/SoapySDR.git
GIT_TAG ${SOAPYSDR_TAG} GIT_TAG ${SOAPYSDR_TAG}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/soapysdr" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/soapysdr"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DENABLE_PYTHON=OFF -DENABLE_PYTHON=OFF
-DENABLE_PYTHON3=OFF -DENABLE_PYTHON3=OFF
-DENABLE_TESTS=OFF -DENABLE_TESTS=OFF
BUILD_BYPRODUCTS "${SOAPYSDR_LIBRARY}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -555,7 +601,6 @@ if (WIN32 OR APPLE)
set(SOAPYSDR_EXTERNAL ON CACHE INTERNAL "") set(SOAPYSDR_EXTERNAL ON CACHE INTERNAL "")
set(SOAPYSDR_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "") set(SOAPYSDR_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(SOAPYSDR_LIBRARY "${SDRANGEL_BINARY_LIB_DIR}/SoapySDR.lib" CACHE INTERNAL "")
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/SoapySDR${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/SoapySDR${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (APPLE) elseif (APPLE)
set(SOAPYSDR_LIBRARY "${binary_dir}/lib/libSoapySDR${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") set(SOAPYSDR_LIBRARY "${binary_dir}/lib/libSoapySDR${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
@ -566,10 +611,10 @@ if (WIN32 OR APPLE)
endif (ENABLE_SOAPYSDR) endif (ENABLE_SOAPYSDR)
if (ENABLE_AIRSPY) if (ENABLE_AIRSPY)
set(AIRSPY_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR})
if (WIN32) if (WIN32)
set(LIBAIRSPY_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/airspy.lib" CACHE INTERNAL "")
set(AIRSPY_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR}/libusb-1.0) set(AIRSPY_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR}/libusb-1.0)
else ()
set(AIRSPY_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR})
endif () endif ()
# needs libusb, pthreads # needs libusb, pthreads
ExternalProject_Add(airspy ExternalProject_Add(airspy
@ -577,11 +622,13 @@ if (WIN32 OR APPLE)
GIT_TAG ${AIRSPY_TAG} GIT_TAG ${AIRSPY_TAG}
DEPENDS ${PTHREADS4W_DEPENDS} DEPENDS ${PTHREADS4W_DEPENDS}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/airspy" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/airspy"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} SOURCE_SUBDIR "libairspy"
CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES} -DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES}
-DLIBUSB_INCLUDE_DIR=${AIRSPY_LIBUSB_INCLUDE_DIR} -DLIBUSB_INCLUDE_DIR=${AIRSPY_LIBUSB_INCLUDE_DIR}
-DTHREADS_PTHREADS_INCLUDE_DIR=${PTHREADS4W_INCLUDE_DIR} -DTHREADS_PTHREADS_INCLUDE_DIR=${PTHREADS4W_INCLUDE_DIR}
-DTHREADS_PTHREADS_WIN32_LIBRARY=${PTHREADS4W_LIBRARIES} -DTHREADS_PTHREADS_WIN32_LIBRARY=${PTHREADS4W_LIBRARIES}
BUILD_BYPRODUCTS "${LIBAIRSPY_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -591,9 +638,8 @@ if (WIN32 OR APPLE)
set(LIBAIRSPY_EXTERNAL ON CACHE INTERNAL "") set(LIBAIRSPY_EXTERNAL ON CACHE INTERNAL "")
set(LIBAIRSPY_INCLUDE_DIR "${source_dir}/libairspy/src" CACHE INTERNAL "") set(LIBAIRSPY_INCLUDE_DIR "${source_dir}/libairspy/src" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIBAIRSPY_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/airspy.lib" CACHE INTERNAL "")
makeCopyDir("${source_dir}/libairspy/src" "${source_dir}/libairspy/src/libairspy" airspy) makeCopyDir("${source_dir}/libairspy/src" "${source_dir}/libairspy/src/libairspy" airspy)
makeCopy("${binary_dir}/airspy-tools/src/airspy${CMAKE_SHARED_LIBRARY_SUFFIX}" "${SDRANGEL_BINARY_BIN_DIR}/airspy${CMAKE_SHARED_LIBRARY_SUFFIX}" airspy) makeCopy("${binary_dir}/../airspy-tools/src/airspy${CMAKE_SHARED_LIBRARY_SUFFIX}" "${SDRANGEL_BINARY_BIN_DIR}/airspy${CMAKE_SHARED_LIBRARY_SUFFIX}" airspy)
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/airspy${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/airspy${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (APPLE) elseif (APPLE)
set(LIBAIRSPY_LIBRARIES "${binary_dir}/libairspy/src/libairspy${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") set(LIBAIRSPY_LIBRARIES "${binary_dir}/libairspy/src/libairspy${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
@ -605,10 +651,10 @@ if (WIN32 OR APPLE)
endif (ENABLE_AIRSPY) endif (ENABLE_AIRSPY)
if (ENABLE_AIRSPYHF) if (ENABLE_AIRSPYHF)
set(AIRSPYHF_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR})
if (WIN32) if (WIN32)
set(LIBAIRSPYHF_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/airspyhf.lib" CACHE INTERNAL "")
set(AIRSPYHF_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR}/libusb-1.0) set(AIRSPYHF_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR}/libusb-1.0)
else ()
set(AIRSPYHF_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR})
endif () endif ()
# needs pkgconfig, libusb, pthreads # needs pkgconfig, libusb, pthreads
ExternalProject_Add(airspyhf ExternalProject_Add(airspyhf
@ -616,11 +662,12 @@ if (WIN32 OR APPLE)
GIT_TAG ${AIRSPYHF_TAG} GIT_TAG ${AIRSPYHF_TAG}
DEPENDS ${PTHREADS4W_DEPENDS} DEPENDS ${PTHREADS4W_DEPENDS}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/airspyhf" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/airspyhf"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES} -DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES}
-DLIBUSB_INCLUDE_DIR=${AIRSPYHF_LIBUSB_INCLUDE_DIR} -DLIBUSB_INCLUDE_DIR=${AIRSPYHF_LIBUSB_INCLUDE_DIR}
-DTHREADS_PTHREADS_INCLUDE_DIR=${PTHREADS4W_INCLUDE_DIR} -DTHREADS_PTHREADS_INCLUDE_DIR=${PTHREADS4W_INCLUDE_DIR}
-DTHREADS_PTHREADS_WIN32_LIBRARY=${PTHREADS4W_LIBRARIES} -DTHREADS_PTHREADS_WIN32_LIBRARY=${PTHREADS4W_LIBRARIES}
BUILD_BYPRODUCTS "${LIBAIRSPYHF_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -630,7 +677,6 @@ if (WIN32 OR APPLE)
set(LIBAIRSPYHF_EXTERNAL ON CACHE INTERNAL "") set(LIBAIRSPYHF_EXTERNAL ON CACHE INTERNAL "")
set(LIBAIRSPYHF_INCLUDE_DIR "${source_dir}/libairspyhf/src" CACHE INTERNAL "") set(LIBAIRSPYHF_INCLUDE_DIR "${source_dir}/libairspyhf/src" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIBAIRSPYHF_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/airspyhf.lib" CACHE INTERNAL "")
makeCopyDir("${source_dir}/libairspyhf/src" "${source_dir}/libairspyhf/src/libairspyhf" airspyhf) makeCopyDir("${source_dir}/libairspyhf/src" "${source_dir}/libairspyhf/src/libairspyhf" airspyhf)
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/airspyhf${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/airspyhf${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (APPLE) elseif (APPLE)
@ -649,6 +695,7 @@ if (WIN32 OR APPLE)
# needs pkgconfig, libusb, fftw, pthreads # needs pkgconfig, libusb, fftw, pthreads
if (WIN32) if (WIN32)
set(HACKRF_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR}/libusb-1.0) set(HACKRF_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR}/libusb-1.0)
set(LIBHACKRF_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/hackrf.lib" CACHE INTERNAL "")
else () else ()
set(HACKRF_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR}) set(HACKRF_LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR})
endif () endif ()
@ -659,13 +706,14 @@ if (WIN32 OR APPLE)
DEPENDS ${PTHREADS4W_DEPENDS} DEPENDS ${PTHREADS4W_DEPENDS}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/hackrf" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/hackrf"
SOURCE_SUBDIR "host/libhackrf" SOURCE_SUBDIR "host/libhackrf"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES} -DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES}
-DLIBUSB_INCLUDE_DIR=${HACKRF_LIBUSB_INCLUDE_DIR} -DLIBUSB_INCLUDE_DIR=${HACKRF_LIBUSB_INCLUDE_DIR}
-DTHREADS_PTHREADS_INCLUDE_DIR=${PTHREADS4W_INCLUDE_DIR} -DTHREADS_PTHREADS_INCLUDE_DIR=${PTHREADS4W_INCLUDE_DIR}
-DTHREADS_PTHREADS_WIN32_LIBRARY=${PTHREADS4W_LIBRARIES} -DTHREADS_PTHREADS_WIN32_LIBRARY=${PTHREADS4W_LIBRARIES}
-DFFTW_INCLUDES=${FFTW3F_INCLUDE_DIRS} -DFFTW_INCLUDES=${FFTW3F_INCLUDE_DIRS}
-DFFTW_LIBRARIES=${FFTW3F_LIBRARIES} -DFFTW_LIBRARIES=${FFTW3F_LIBRARIES}
BUILD_BYPRODUCTS "${LIBHACKRF_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -675,7 +723,6 @@ if (WIN32 OR APPLE)
set(LIBHACKRF_EXTERNAL ON CACHE INTERNAL "") set(LIBHACKRF_EXTERNAL ON CACHE INTERNAL "")
set(LIBHACKRF_INCLUDE_DIR "${source_dir}/host/libhackrf" CACHE INTERNAL "") set(LIBHACKRF_INCLUDE_DIR "${source_dir}/host/libhackrf" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIBHACKRF_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/hackrf.lib" CACHE INTERNAL "")
# include "libhackrf/hackrf.h" # include "libhackrf/hackrf.h"
makeCopyDir("${source_dir}/host/libhackrf/src" "${source_dir}/host/libhackrf/libhackrf" hackrf) makeCopyDir("${source_dir}/host/libhackrf/src" "${source_dir}/host/libhackrf/libhackrf" hackrf)
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/hackrf${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/hackrf${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
@ -722,6 +769,7 @@ if (WIN32 OR APPLE)
set(LIBXML2_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "") set(LIBXML2_INCLUDE_DIR "${source_dir}/include" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIBXML2_LIBRARIES "${source_dir}/win32/bin.msvc/libxml2.lib" CACHE INTERNAL "") set(LIBXML2_LIBRARIES "${source_dir}/win32/bin.msvc/libxml2.lib" CACHE INTERNAL "")
set(LIBIIO_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/libiio.lib" CACHE INTERNAL "")
makeCopy("${source_dir}/win32/bin.msvc/libxml2${CMAKE_SHARED_LIBRARY_SUFFIX}" "${SDRANGEL_BINARY_BIN_DIR}/libxml2${CMAKE_SHARED_LIBRARY_SUFFIX}" libxml2) makeCopy("${source_dir}/win32/bin.msvc/libxml2${CMAKE_SHARED_LIBRARY_SUFFIX}" "${SDRANGEL_BINARY_BIN_DIR}/libxml2${CMAKE_SHARED_LIBRARY_SUFFIX}" libxml2)
install(FILES "${source_dir}/win32/bin.msvc/libxml2${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${source_dir}/win32/bin.msvc/libxml2${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (APPLE) elseif (APPLE)
@ -736,7 +784,7 @@ if (WIN32 OR APPLE)
GIT_TAG ${LIBIIO_TAG} GIT_TAG ${LIBIIO_TAG}
DEPENDS ${PTHREADS4W_DEPENDS} ${LIBXML2_DEPENDS} DEPENDS ${PTHREADS4W_DEPENDS} ${LIBXML2_DEPENDS}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/libiio" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/libiio"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES} -DLIBUSB_LIBRARIES=${LIBUSB_LIBRARIES}
-DLIBUSB_INCLUDE_DIR=${LIBUSB_INCLUDE_DIR} -DLIBUSB_INCLUDE_DIR=${LIBUSB_INCLUDE_DIR}
-DTHREADS_PTHREADS_INCLUDE_DIR=${PTHREADS4W_INCLUDE_DIR} -DTHREADS_PTHREADS_INCLUDE_DIR=${PTHREADS4W_INCLUDE_DIR}
@ -747,6 +795,7 @@ if (WIN32 OR APPLE)
-DPYTHON_BINDINGS=OFF -DPYTHON_BINDINGS=OFF
-DWITH_MATLAB_BINDINGS_API=OFF -DWITH_MATLAB_BINDINGS_API=OFF
-DOSX_PACKAGE=OFF -DOSX_PACKAGE=OFF
BUILD_BYPRODUCTS "${LIBIIO_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -756,7 +805,6 @@ if (WIN32 OR APPLE)
set(LIBIIO_EXTERNAL ON CACHE INTERNAL "") set(LIBIIO_EXTERNAL ON CACHE INTERNAL "")
set(LIBIIO_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "") set(LIBIIO_INCLUDE_DIR "${source_dir}" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIBIIO_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/libiio.lib" CACHE INTERNAL "")
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/libiio${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/libiio${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (APPLE) elseif (APPLE)
set(LIBIIO_LIBRARIES "${binary_dir}/libiio${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") set(LIBIIO_LIBRARIES "${binary_dir}/libiio${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
@ -771,12 +819,16 @@ if (WIN32 OR APPLE)
if (ENABLE_BLADERF) if (ENABLE_BLADERF)
# needs pkgconfig, libusb, pthreads # needs pkgconfig, libusb, pthreads
if (WIN32)
set(LIBBLADERF_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/bladeRF.lib" CACHE INTERNAL "")
endif ()
ExternalProject_Add(bladerf ExternalProject_Add(bladerf
GIT_REPOSITORY https://github.com/Nuand/bladeRF.git GIT_REPOSITORY https://github.com/Nuand/bladeRF.git
GIT_TAG ${BLADERF_TAG} GIT_TAG ${BLADERF_TAG}
DEPENDS ${PTHREADS4W_DEPENDS} DEPENDS ${PTHREADS4W_DEPENDS}
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/bladerf" PREFIX "${EXTERNAL_BUILD_LIBRARIES}/bladerf"
CMAKE_ARGS ${DEFAULT_OUTPUT_DIRECTORIES} SOURCE_SUBDIR "host"
CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DPKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE} -DPKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}
-DENABLE_BACKEND_USB=ON -DENABLE_BACKEND_USB=ON
-DENABLE_BACKEND_LIBUSB=ON -DENABLE_BACKEND_LIBUSB=ON
@ -790,6 +842,7 @@ if (WIN32 OR APPLE)
-DENABLE_HOST_BUILD=ON -DENABLE_HOST_BUILD=ON
-DENABLE_BACKEND_CYAPI=OFF -DENABLE_BACKEND_CYAPI=OFF
-DTREAT_WARNINGS_AS_ERRORS=OFF -DTREAT_WARNINGS_AS_ERRORS=OFF
BUILD_BYPRODUCTS "${LIBBLADERF_LIBRARIES}"
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""
) )
@ -799,7 +852,6 @@ if (WIN32 OR APPLE)
set(LIBBLADERF_EXTERNAL ON CACHE INTERNAL "") set(LIBBLADERF_EXTERNAL ON CACHE INTERNAL "")
set(LIBBLADERF_INCLUDE_DIRS "${source_dir}/host/libraries/libbladeRF/include" CACHE INTERNAL "") set(LIBBLADERF_INCLUDE_DIRS "${source_dir}/host/libraries/libbladeRF/include" CACHE INTERNAL "")
if (WIN32) if (WIN32)
set(LIBBLADERF_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/bladeRF.lib" CACHE INTERNAL "")
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/bladeRF${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") install(FILES "${SDRANGEL_BINARY_BIN_DIR}/bladeRF${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (APPLE) elseif (APPLE)
set(LIBBLADERF_LIBRARIES "${binary_dir}/host/output/libbladeRF${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") set(LIBBLADERF_LIBRARIES "${binary_dir}/host/output/libbladeRF${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")

2
external/windows vendored

@ -1 +1 @@
Subproject commit f781c2fa49717ff509fdb82eb50c1c55bd64b41d Subproject commit a47e94ace126e9562fdc58d27fce95412e10d932

View File

@ -14,7 +14,8 @@
"--share=ipc", "--share=ipc",
"--socket=pulseaudio", "--socket=pulseaudio",
"--socket=x11", "--socket=x11",
"--socket=wayland" "--socket=wayland",
"--env=QT_QPA_PLATFORM=xcb"
], ],
"modules": [ "modules": [
{ {

View File

@ -23,7 +23,7 @@
namespace qtwebapp { namespace qtwebapp {
/** Alias type definition, for compatibility to different Qt versions */ /** Alias type definition, for compatibility to different Qt versions */
#if QT_VERSION >= 0x050000 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
typedef qintptr tSocketDescriptor; typedef qintptr tSocketDescriptor;
#else #else
typedef int tSocketDescriptor; typedef int tSocketDescriptor;

View File

@ -73,7 +73,7 @@ void Logger::msgHandler(const QtMsgType type, const QString &message, const QStr
} }
#if QT_VERSION >= 0x050000 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
void Logger::msgHandler5(const QtMsgType type, const QMessageLogContext &context, const QString &message) void Logger::msgHandler5(const QtMsgType type, const QMessageLogContext &context, const QString &message)
{ {
(void)(context); // suppress "unused parameter" warning (void)(context); // suppress "unused parameter" warning
@ -91,7 +91,7 @@ Logger::~Logger()
{ {
if (defaultLogger==this) if (defaultLogger==this)
{ {
#if QT_VERSION >= 0x050000 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
qInstallMessageHandler(0); qInstallMessageHandler(0);
#else #else
qInstallMsgHandler(0); qInstallMsgHandler(0);
@ -111,7 +111,7 @@ void Logger::write(const LogMessage* logMessage)
void Logger::installMsgHandler() void Logger::installMsgHandler()
{ {
defaultLogger=this; defaultLogger=this;
#if QT_VERSION >= 0x050000 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
qInstallMessageHandler(msgHandler5); qInstallMessageHandler(msgHandler5);
#else #else
qInstallMsgHandler(msgHandler4); qInstallMsgHandler(msgHandler4);

View File

@ -22,10 +22,7 @@ set(chanalyzer_HEADERS
) )
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
)
include_directories(
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
) )

View File

@ -16,7 +16,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#define _USE_MATH_DEFINES
#include <cmath> #include <cmath>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"

View File

@ -22,8 +22,8 @@ set(atv_HEADERS
) )
include_directories( include_directories(
${Boost_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Boost_INCLUDE_DIRS}
) )
add_library(demodatv SHARED add_library(demodatv SHARED

View File

@ -523,8 +523,7 @@ void BFMDemodGUI::tick()
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1)); ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
Real pilotPowDb = CalcDb::dbPower(m_bfmDemod->getPilotLevel()); Real pilotPowDb = CalcDb::dbPower(m_bfmDemod->getPilotLevel());
QString pilotPowDbStr; QString pilotPowDbStr = QString("%1%2").arg(pilotPowDb < 0 ? '-' : '+').arg(pilotPowDb, 3, 'f', 1, QLatin1Char('0'));
pilotPowDbStr.sprintf("%+02.1f", pilotPowDb);
ui->pilotPower->setText(pilotPowDbStr); ui->pilotPower->setText(pilotPowDbStr);
if (m_bfmDemod->getAudioSampleRate() < 0) if (m_bfmDemod->getAudioSampleRate() < 0)

View File

@ -19,15 +19,10 @@
#include "../../channelrx/demodbfm/rdsdemod.h" #include "../../channelrx/demodbfm/rdsdemod.h"
#include <QDebug> #include <QDebug>
#include <math.h> #include <cmath>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#undef M_PI
#define M_PI 3.14159265358979323846
#undef M_PI_2
#define M_PI_2 1.57079632679489661923
const Real RDSDemod::m_pllBeta = 50; const Real RDSDemod::m_pllBeta = 50;
const Real RDSDemod::m_fsc = 1187.5; const Real RDSDemod::m_fsc = 1187.5;

View File

@ -670,19 +670,20 @@ void DATVDemodGUI::on_udpTS_clicked(bool checked)
void DATVDemodGUI::on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData) void DATVDemodGUI::on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData)
{ {
QString strMetaData="";
if (objMetaData != nullptr) if (objMetaData != nullptr)
{ {
QString strMetaData = "";
if (objMetaData->OK_TransportStream == true) if (objMetaData->OK_TransportStream == true)
{ {
strMetaData.sprintf("PID: %d - Width: %d - Height: %d\r\n%s%s\r\nCodec: %s\r\n", strMetaData = tr("PID: %1 - Width: %2 - Height: %3\r\n%4%5\r\nCodec: %6\r\n")
objMetaData->PID, .arg(objMetaData->PID)
objMetaData->Width, .arg(objMetaData->Width)
objMetaData->Height, .arg(objMetaData->Height)
objMetaData->Program.toStdString().c_str(), .arg(objMetaData->Program)
objMetaData->Stream.toStdString().c_str(), .arg(objMetaData->Stream)
objMetaData->CodecDescription.toStdString().c_str()); .arg(objMetaData->CodecDescription);
} }
ui->streamInfo->setText(strMetaData); ui->streamInfo->setText(strMetaData);

View File

@ -17,17 +17,14 @@
#ifndef LEANSDR_DVB_H #ifndef LEANSDR_DVB_H
#define LEANSDR_DVB_H #define LEANSDR_DVB_H
#include <stdint.h> #include <cmath>
#include <cstdint>
#include "leansdr/convolutional.h" #include "leansdr/convolutional.h"
#include "leansdr/rs.h" #include "leansdr/rs.h"
#include "leansdr/sdr.h" #include "leansdr/sdr.h"
#include "leansdr/viterbi.h" #include "leansdr/viterbi.h"
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
namespace leansdr namespace leansdr
{ {

View File

@ -17,13 +17,9 @@
#ifndef LEANSDR_MATH_H #ifndef LEANSDR_MATH_H
#define LEANSDR_MATH_H #define LEANSDR_MATH_H
#include <math.h> #include <cmath>
#include <stdint.h> #include <stdint.h>
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
namespace leansdr namespace leansdr
{ {

View File

@ -126,8 +126,8 @@ void NFMDemodGUI::on_afBW_valueChanged(int value)
void NFMDemodGUI::on_volume_valueChanged(int value) void NFMDemodGUI::on_volume_valueChanged(int value)
{ {
ui->volumeText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1)); ui->volumeText->setText(QString("%1").arg(value));
m_settings.m_volume = value / 10.0; m_settings.m_volume = value / 100.0;
applySettings(); applySettings();
} }
@ -368,8 +368,8 @@ void NFMDemodGUI::displaySettings()
ui->afBWText->setText(QString("%1 k").arg(m_settings.m_afBandwidth / 1000.0)); ui->afBWText->setText(QString("%1 k").arg(m_settings.m_afBandwidth / 1000.0));
ui->afBW->setValue(m_settings.m_afBandwidth / 1000.0); ui->afBW->setValue(m_settings.m_afBandwidth / 1000.0);
ui->volumeText->setText(QString("%1").arg(m_settings.m_volume, 0, 'f', 1)); ui->volumeText->setText(QString("%1").arg(m_settings.m_volume*100.0, 0, 'f', 0));
ui->volume->setValue(m_settings.m_volume * 10.0); ui->volume->setValue(m_settings.m_volume * 100.0);
ui->squelchGateText->setText(QString("%1").arg(m_settings.m_squelchGate * 10.0f, 0, 'f', 0)); ui->squelchGateText->setText(QString("%1").arg(m_settings.m_squelchGate * 10.0f, 0, 'f', 0));
ui->squelchGate->setValue(m_settings.m_squelchGate); ui->squelchGate->setValue(m_settings.m_squelchGate);

View File

@ -336,16 +336,19 @@
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Sound volume</string> <string>Sound volume (%)</string>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>40</number> <number>200</number>
</property>
<property name="singleStep">
<number>1</number>
</property> </property>
<property name="pageStep"> <property name="pageStep">
<number>1</number> <number>1</number>
</property> </property>
<property name="value"> <property name="value">
<number>10</number> <number>100</number>
</property> </property>
</widget> </widget>
</item> </item>
@ -364,10 +367,10 @@
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Sound volume</string> <string>Sound volume (%)</string>
</property> </property>
<property name="text"> <property name="text">
<string>1.0</string> <string>100</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

View File

@ -23,13 +23,15 @@
#include "nfmdemodsettings.h" #include "nfmdemodsettings.h"
// fixed |Carson (3k) |Carson (6k)
// | 11F3 16F3 |
const int NFMDemodSettings::m_rfBW[] = { const int NFMDemodSettings::m_rfBW[] = {
5000, 6250, 8330, 10000, 12500, 15000, 20000, 25000, 40000 5000, 6250, 8330, 11000, 16000, 20000, 25000, 40000
}; };
const int NFMDemodSettings::m_fmDev[] = { // corresponding single side FM deviations at 0.4 * BW const int NFMDemodSettings::m_fmDev[] = {
2000, 2500, 3330, 4000, 5000, 6000, 8000, 10000, 16000 2500, 2500, 3330, 5000, 10000, 14000, 19000, 28000
}; };
const int NFMDemodSettings::m_nbRfBW = 9; const int NFMDemodSettings::m_nbRfBW = 8;
NFMDemodSettings::NFMDemodSettings() : NFMDemodSettings::NFMDemodSettings() :
m_channelMarker(0) m_channelMarker(0)

View File

@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <stdio.h> #include <cstdio>
#include <complex.h> #include <complex.h>
#include <QTime> #include <QTime>
@ -27,6 +27,7 @@
#include "dsp/dspengine.h" #include "dsp/dspengine.h"
#include "dsp/dspcommands.h" #include "dsp/dspcommands.h"
#include "dsp/devicesamplemimo.h" #include "dsp/devicesamplemimo.h"
#include "dsp/misc.h"
#include "device/deviceapi.h" #include "device/deviceapi.h"
#include "nfmdemodreport.h" #include "nfmdemodreport.h"
@ -58,6 +59,7 @@ NFMDemodSink::NFMDemodSink() :
{ {
m_agcLevel = 1.0; m_agcLevel = 1.0;
m_audioBuffer.resize(1<<16); m_audioBuffer.resize(1<<16);
m_phaseDiscri.setFMScaling(0.5f);
applySettings(m_settings, true); applySettings(m_settings, true);
applyChannelSettings(m_channelSampleRate, m_channelFrequencyOffset, true); applyChannelSettings(m_channelSampleRate, m_channelFrequencyOffset, true);
@ -171,12 +173,13 @@ void NFMDemodSink::processOneSample(Complex &ci)
} }
} }
if (!m_settings.m_audioMute && (m_settings.m_ctcssOn && m_ctcssIndexSelected == ctcssIndex || m_ctcssIndexSelected == 0)) if (!m_settings.m_audioMute && (!m_settings.m_ctcssOn || m_ctcssIndexSelected == ctcssIndex || m_ctcssIndexSelected == 0))
{ {
Real audioSample = m_squelchDelayLine.readBack(m_squelchGate); Real audioSample = m_squelchDelayLine.readBack(m_squelchGate);
audioSample = m_settings.m_highPass ? m_bandpass.filter(audioSample) : m_lowpass.filter(audioSample); audioSample = m_settings.m_highPass ? m_bandpass.filter(audioSample) : m_lowpass.filter(audioSample);
audioSample *= m_settings.m_volume * m_filterTaps;
sample = std::lrint(audioSample); audioSample *= m_settings.m_volume * std::numeric_limits<int16_t>::max();
sample = clamp<float>(std::rint(audioSample), std::numeric_limits<int16_t>::lowest(), std::numeric_limits<int16_t>::max());
} }
} }
@ -260,7 +263,7 @@ void NFMDemodSink::applySettings(const NFMDemodSettings& settings, bool force)
if ((settings.m_fmDeviation != m_settings.m_fmDeviation) || force) if ((settings.m_fmDeviation != m_settings.m_fmDeviation) || force)
{ {
m_phaseDiscri.setFMScaling((8.0f*m_audioSampleRate) / static_cast<float>(settings.m_fmDeviation)); // integrate 4x factor m_phaseDiscri.setFMScaling((0.5f *m_audioSampleRate) / static_cast<float>(settings.m_fmDeviation)); // integrate 4x factor
} }
if ((settings.m_afBandwidth != m_settings.m_afBandwidth) || force) if ((settings.m_afBandwidth != m_settings.m_afBandwidth) || force)
@ -324,7 +327,7 @@ void NFMDemodSink::applyAudioSampleRate(unsigned int sampleRate)
m_afSquelch.setCoefficients(sampleRate/2000, 600, sampleRate, 200, 0, afSqTones); // 0.5ms test period, 300ms average span, audio SR, 100ms attack, no decay m_afSquelch.setCoefficients(sampleRate/2000, 600, sampleRate, 200, 0, afSqTones); // 0.5ms test period, 300ms average span, audio SR, 100ms attack, no decay
} }
m_phaseDiscri.setFMScaling((8.0f*sampleRate) / static_cast<float>(m_settings.m_fmDeviation)); // integrate 4x factor m_phaseDiscri.setFMScaling((0.5f * sampleRate) / static_cast<float>(m_settings.m_fmDeviation));
m_audioFifo.setSize(sampleRate); m_audioFifo.setSize(sampleRate);
m_squelchDelayLine.resize(sampleRate/2); m_squelchDelayLine.resize(sampleRate/2);
m_interpolatorDistanceRemain = 0; m_interpolatorDistanceRemain = 0;

View File

@ -139,39 +139,6 @@ private:
void processOneSample(Complex &ci); void processOneSample(Complex &ci);
MessageQueue *getMessageQueueToGUI() { return m_messageQueueToGUI; } MessageQueue *getMessageQueueToGUI() { return m_messageQueueToGUI; }
inline float arctan2(Real y, Real x)
{
Real coeff_1 = M_PI / 4;
Real coeff_2 = 3 * coeff_1;
Real abs_y = fabs(y) + 1e-10; // kludge to prevent 0/0 condition
Real angle;
if( x>= 0) {
Real r = (x - abs_y) / (x + abs_y);
angle = coeff_1 - coeff_1 * r;
} else {
Real r = (x + abs_y) / (abs_y - x);
angle = coeff_2 - coeff_1 * r;
}
if(y < 0) {
return(-angle);
} else {
return(angle);
}
}
inline Real angleDist(Real a, Real b)
{
Real dist = b - a;
while(dist <= M_PI)
dist += 2 * M_PI;
while(dist >= M_PI)
dist -= 2 * M_PI;
return dist;
}
}; };
#endif // INCLUDE_NFMDEMODSINK_H #endif // INCLUDE_NFMDEMODSINK_H

View File

@ -12,7 +12,7 @@
const PluginDescriptor NFMPlugin::m_pluginDescriptor = { const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
NFMDemod::m_channelId, NFMDemod::m_channelId,
QString("NFM Demodulator"), QString("NFM Demodulator"),
QString("4.21.1"), QString("4.21.2"),
QString("(c) Edouard Griffiths, F4EXB"), QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"), QString("https://github.com/f4exb/sdrangel"),
true, true,

View File

@ -24,7 +24,16 @@ Average total power in dB relative to a +/- 1.0 amplitude signal received in the
<h3>4: RF bandwidth</h3> <h3>4: RF bandwidth</h3>
This is the bandwidth in kHz of the channel signal before demodulation. It can be set in steps as 5, 6.25, 8.33, 10, 12.5, 15, 20, 25 and 40 kHz. The expected one side frequency deviation is 0.4 times the bandwidth. This is the bandwidth in kHz of the channel signal before demodulation. It can take these values with the corresponding nominal frequency deviation:
- **5** kHz: &plusmn; 1.25 kHz
- **6.25** kHz: &plusmn; 1.25 kHz
- **8.33** kHz: &plusmn; 1.67 kHz
- **11** kHz: &plusmn; 2.5 kHz (11F3)
- **16** kHz: &plusmn; 5 kHz (16F3)
- **20** kHz: &plusmn; 7 kHz
- **25** kHz: &plusmn; 9.5 kHz
- **40** kHz: &plusmn; 14 kHz
&#9758; The demodulation is done at the channel sample rate which is guaranteed not to be lower than the requested audio sample rate but can possibly be equal to it. This means that for correct operation in any case you must ensure that the sample rate of the audio device is not lower than the Nyquist rate required to process this channel bandwidth. &#9758; The demodulation is done at the channel sample rate which is guaranteed not to be lower than the requested audio sample rate but can possibly be equal to it. This means that for correct operation in any case you must ensure that the sample rate of the audio device is not lower than the Nyquist rate required to process this channel bandwidth.
@ -36,7 +45,7 @@ This is the bandwidth of the audio signal in kHz (i.e. after demodulation). It c
<h3>6: Volume</h3> <h3>6: Volume</h3>
This is the volume of the audio signal from 0.0 (mute) to 4.0 (maximum). It can be varied continuously in 0.1 steps using the dial button. This is the volume of the audio signal from 0% (mute) to 200% (maximum) of volume at nominal frequency deviation. It can be varied continuously 1% steps using the dial button.
<h3>7: Delta/Level squelch</h3> <h3>7: Delta/Level squelch</h3>

View File

@ -22,7 +22,7 @@ set(filesink_HEADERS
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}
) )
if(NOT SERVER_MODE) if(NOT SERVER_MODE)

View File

@ -22,7 +22,7 @@ set(localsink_HEADERS
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}
) )
if(NOT SERVER_MODE) if(NOT SERVER_MODE)

View File

@ -33,9 +33,9 @@ set(remotesink_HEADERS
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Boost_INCLUDE_DIRS}
${CM256CC_INCLUDE_DIR} ${CM256CC_INCLUDE_DIR}
${CUSTOM_WINDOWS_INCLUDE} ${CUSTOM_WINDOWS_INCLUDE}
${Boost_INCLUDE_DIRS}
) )
if(NOT SERVER_MODE) if(NOT SERVER_MODE)

View File

@ -20,8 +20,8 @@ set(mod_ieee_802_15_4_HEADERS
) )
include_directories( include_directories(
${Boost_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Boost_INCLUDE_DIRS}
) )
if(NOT SERVER_MODE) if(NOT SERVER_MODE)

View File

@ -299,7 +299,7 @@
<string>Modulation percentage</string> <string>Modulation percentage</string>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>250</number> <number>300</number>
</property> </property>
<property name="pageStep"> <property name="pageStep">
<number>1</number> <number>1</number>
@ -827,29 +827,29 @@
<header>gui/rollupwidget.h</header> <header>gui/rollupwidget.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>LevelMeterVU</class> <class>LevelMeterVU</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/levelmeter.h</header> <header>gui/levelmeter.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget> <customwidget>
<class>CWKeyerGUI</class> <class>CWKeyerGUI</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/cwkeyergui.h</header> <header>gui/cwkeyergui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../../../sdrgui/resources/res.qrc"/> <include location="../../../sdrgui/resources/res.qrc"/>

View File

@ -28,7 +28,7 @@
const PluginDescriptor NFMModPlugin::m_pluginDescriptor = { const PluginDescriptor NFMModPlugin::m_pluginDescriptor = {
NFMMod::m_channelId, NFMMod::m_channelId,
QString("NFM Modulator"), QString("NFM Modulator"),
QString("4.21.1"), QString("4.21.2"),
QString("(c) Edouard Griffiths, F4EXB"), QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"), QString("https://github.com/f4exb/sdrangel"),
true, true,

View File

@ -134,11 +134,10 @@ void NFMModSource::modulateSample()
calculateLevel(t); calculateLevel(t);
m_audioBufferFill++; m_audioBufferFill++;
// 0.625 = 1/1.25 (heuristic)
if (m_settings.m_ctcssOn) { if (m_settings.m_ctcssOn) {
m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * (0.85f * m_bandpass.filter(t) + 0.15f * 0.625f * m_ctcssNco.next()) * (M_PI / 0.625f); m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * (0.85f * m_bandpass.filter(t) + 0.15f * 0.625f * m_ctcssNco.next()) * 1.33f;
} else { } else {
m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * m_bandpass.filter(t) * (M_PI / 0.625f); m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * m_bandpass.filter(t) * 1.33f;
} }
// limit phasor range to ]-pi,pi] // limit phasor range to ]-pi,pi]

View File

@ -30,7 +30,7 @@ This is the bandwidth in khz of the modulating signal filtered before modulation
<h3>7: Frequency deviation</h3> <h3>7: Frequency deviation</h3>
Adjusts the frequency deviation in 0.1 kHz steps from 0 to 25 kHz Adjusts the frequency deviation in 0.1 kHz steps from 0 to 30 kHz. This is the full deviation.
<h3>8: Volume</h3> <h3>8: Volume</h3>

View File

@ -15,7 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#define _USE_MATH_DEFINES
#include <cmath> #include <cmath>
#include "packetmodbpfdialog.h" #include "packetmodbpfdialog.h"
#include "ui_packetmodbpfdialog.h" #include "ui_packetmodbpfdialog.h"

View File

@ -31,9 +31,9 @@ set(remotesource_HEADERS
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Boost_INCLUDE_DIRS}
${CM256CC_INCLUDE_DIR} ${CM256CC_INCLUDE_DIR}
${CUSTOM_WINDOWS_INCLUDE} ${CUSTOM_WINDOWS_INCLUDE}
${Boost_INCLUDE_DIRS}
) )
if(NOT SERVER_MODE) if(NOT SERVER_MODE)

View File

@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include "remotesourcegui.h" #include <QTime>
#include "device/deviceapi.h" #include "device/deviceapi.h"
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
@ -26,6 +26,8 @@
#include "remotesource.h" #include "remotesource.h"
#include "ui_remotesourcegui.h" #include "ui_remotesourcegui.h"
#include "remotesourcegui.h"
RemoteSourceGUI* RemoteSourceGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx) RemoteSourceGUI* RemoteSourceGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
{ {
RemoteSourceGUI* gui = new RemoteSourceGUI(pluginAPI, deviceUISet, channelTx); RemoteSourceGUI* gui = new RemoteSourceGUI(pluginAPI, deviceUISet, channelTx);

View File

@ -18,7 +18,7 @@
#ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_ #ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_
#define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_ #define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_
#include <QTime> #include <QElapsedTimer>
#include "dsp/channelmarker.h" #include "dsp/channelmarker.h"
#include "channel/channelgui.h" #include "channel/channelgui.h"
@ -69,7 +69,7 @@ private:
uint32_t m_lastSampleCount; uint32_t m_lastSampleCount;
uint64_t m_lastTimestampUs; uint64_t m_lastTimestampUs;
bool m_resetCounts; bool m_resetCounts;
QTime m_time; QElapsedTimer m_time;
uint32_t m_tickCount; uint32_t m_tickCount;
explicit RemoteSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0); explicit RemoteSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0);

View File

@ -17,7 +17,6 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <assert.h>
#include <algorithm> #include <algorithm>
#include <QDebug> #include <QDebug>
@ -39,7 +38,6 @@ FileOutputWorker::FileOutputWorker(std::ofstream *samplesStream, SampleSourceFif
m_throttleToggle(false), m_throttleToggle(false),
m_buf(nullptr) m_buf(nullptr)
{ {
assert(m_ofstream != nullptr);
} }
FileOutputWorker::~FileOutputWorker() FileOutputWorker::~FileOutputWorker()

View File

@ -18,7 +18,6 @@
#include <stdint.h> #include <stdint.h>
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
#include <cassert>
#include <QDebug> #include <QDebug>
#include <QMessageBox> #include <QMessageBox>

View File

@ -34,8 +34,8 @@ set(remoteoutput_HEADERS
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${CMAKE_SOURCE_DIR}/devices ${CMAKE_SOURCE_DIR}/devices
${Boost_INCLUDE_DIRS}
${CM256CC_INCLUDE_DIR} ${CM256CC_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
) )
if(NOT SERVER_MODE) if(NOT SERVER_MODE)

View File

@ -17,7 +17,6 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <assert.h>
#include <algorithm> #include <algorithm>
#include <QDebug> #include <QDebug>

View File

@ -17,7 +17,6 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <assert.h>
#include <algorithm> #include <algorithm>
#include <QDebug> #include <QDebug>
@ -225,4 +224,4 @@ void TestSinkWorker::feedSpectrum(int16_t *buf, unsigned int bufSize)
); );
m_spectrumSink->feed(m_samplesVector.m_vector.begin(), m_samplesVector.m_vector.begin() + (bufSize/2), false); m_spectrumSink->feed(m_samplesVector.m_vector.begin(), m_samplesVector.m_vector.begin() + (bufSize/2), false);
} }

View File

@ -1,7 +1,3 @@
if(WIN32)
link_directories(${BOOST_LIBRARYDIR})
endif()
project(usrpoutput) project(usrpoutput)
set(usrpoutput_SOURCES set(usrpoutput_SOURCES

View File

@ -17,7 +17,6 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <assert.h>
#include <QDebug> #include <QDebug>
#include "dsp/filerecord.h" #include "dsp/filerecord.h"
@ -49,7 +48,6 @@ FileInputWorker::FileInputWorker(std::ifstream *samplesStream,
m_throttlems(FILESOURCE_THROTTLE_MS), m_throttlems(FILESOURCE_THROTTLE_MS),
m_throttleToggle(false) m_throttleToggle(false)
{ {
assert(m_ifstream != nullptr);
} }
FileInputWorker::~FileInputWorker() FileInputWorker::~FileInputWorker()

View File

@ -18,7 +18,7 @@ set(kiwisdr_HEADERS
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
) )
if(NOT SERVER_MODE) if(NOT SERVER_MODE)
@ -55,4 +55,4 @@ target_link_libraries(${TARGET_NAME}
${TARGET_LIB_GUI} ${TARGET_LIB_GUI}
) )
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER})

View File

@ -32,7 +32,7 @@
const PluginDescriptor KiwiSDRPlugin::m_pluginDescriptor = { const PluginDescriptor KiwiSDRPlugin::m_pluginDescriptor = {
QString("KiwiSDR"), QString("KiwiSDR"),
QString("KiwiSDR input"), QString("KiwiSDR input"),
QString("4.19.0"), QString("4.21.2"),
QString("(c) Vort (c) Edouard Griffiths, F4EXB"), QString("(c) Vort (c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"), QString("https://github.com/f4exb/sdrangel"),
true, true,

View File

@ -86,8 +86,7 @@ void KiwiSDRWorker::onBinaryMessageReceived(const QByteArray &message)
if (message[0] == 'M' && message[1] == 'S' && message[2] == 'G') if (message[0] == 'M' && message[1] == 'S' && message[2] == 'G')
{ {
QStringList al = QString::fromUtf8(message).split(' '); QStringList al = QString::fromUtf8(message).split(' ');
if (al[1] == "audio_init=0" && if (al.size() > 2 && al[2] == "audio_rate=12000")
al[2] == "audio_rate=12000")
{ {
m_webSocket.sendTextMessage("SET AR OK in=12000 out=48000"); m_webSocket.sendTextMessage("SET AR OK in=12000 out=48000");
m_webSocket.sendTextMessage("SERVER DE CLIENT KiwiAngel SND"); m_webSocket.sendTextMessage("SERVER DE CLIENT KiwiAngel SND");
@ -157,4 +156,4 @@ void KiwiSDRWorker::onServerAddressChanged(QString serverAddress)
void KiwiSDRWorker::tick() void KiwiSDRWorker::tick()
{ {
m_webSocket.sendTextMessage("SET keepalive"); m_webSocket.sendTextMessage("SET keepalive");
} }

View File

@ -18,7 +18,6 @@
#include <stdint.h> #include <stdint.h>
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
#include <cassert>
#include <QDebug> #include <QDebug>
#include <QMessageBox> #include <QMessageBox>

View File

@ -29,8 +29,8 @@ set(remoteinput_HEADERS
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Boost_INCLUDE_DIRS}
${CM256CC_INCLUDE_DIR} ${CM256CC_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
) )
if(NOT SERVER_MODE) if(NOT SERVER_MODE)

View File

@ -16,7 +16,6 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QDebug> #include <QDebug>
#include <cassert>
#include <cstring> #include <cstring>
#include <cmath> #include <cmath>
#include <algorithm> #include <algorithm>

View File

@ -18,7 +18,6 @@
#include <stdint.h> #include <stdint.h>
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
#include <cassert>
#include <QDebug> #include <QDebug>
#include <QMessageBox> #include <QMessageBox>

View File

@ -144,16 +144,14 @@ bool SDRPlayGui::handleMessage(const Message& message)
ui->gainMixer->setChecked(msg.getMixerGain() != 0); ui->gainMixer->setChecked(msg.getMixerGain() != 0);
ui->gainBaseband->setValue(msg.getBasebandGain()); ui->gainBaseband->setValue(msg.getBasebandGain());
QString gainText; QString gainText = QStringLiteral("%1").arg(msg.getBasebandGain(), 2, 10, QLatin1Char('0'));
gainText.sprintf("%02d", msg.getBasebandGain());
ui->gainBasebandText->setText(gainText); ui->gainBasebandText->setText(gainText);
} }
else else
{ {
ui->gainTuner->setValue(msg.getTunerGain()); ui->gainTuner->setValue(msg.getTunerGain());
QString gainText; QString gainText = QStringLiteral("%1").arg(msg.getTunerGain(), 3, 10, QLatin1Char('0'));
gainText.sprintf("%03d", msg.getTunerGain());
ui->gainTunerText->setText(gainText); ui->gainTunerText->setText(gainText);
} }
@ -241,8 +239,7 @@ void SDRPlayGui::displaySettings()
int gain = m_settings.m_tunerGain; int gain = m_settings.m_tunerGain;
ui->gainTuner->setValue(gain); ui->gainTuner->setValue(gain);
QString gainText; QString gainText = QStringLiteral("%1").arg(gain, 3, 10, QLatin1Char('0'));
gainText.sprintf("%03d", gain);
ui->gainTunerText->setText(gainText); ui->gainTunerText->setText(gainText);
m_settings.m_tunerGain = gain; m_settings.m_tunerGain = gain;
} }
@ -258,8 +255,7 @@ void SDRPlayGui::displaySettings()
int gain = m_settings.m_basebandGain; int gain = m_settings.m_basebandGain;
ui->gainBaseband->setValue(gain); ui->gainBaseband->setValue(gain);
QString gainText; QString gainText = QStringLiteral("%1").arg(gain, 2, 10, QLatin1Char('0'));
gainText.sprintf("%02d", gain);
ui->gainBasebandText->setText(gainText); ui->gainBasebandText->setText(gainText);
} }
} }
@ -393,9 +389,7 @@ void SDRPlayGui::on_gainTunerOn_toggled(bool checked)
void SDRPlayGui::on_gainTuner_valueChanged(int value) void SDRPlayGui::on_gainTuner_valueChanged(int value)
{ {
int gain = value; int gain = value;
QString gainText; QString gainText = QStringLiteral("%1").arg(gain, 3, 10, QLatin1Char('0'));
gainText.sprintf("%03d", gain);
ui->gainTunerText->setText(gainText);
m_settings.m_tunerGain = gain; m_settings.m_tunerGain = gain;
sendSettings(); sendSettings();
@ -429,8 +423,7 @@ void SDRPlayGui::on_gainBaseband_valueChanged(int value)
{ {
m_settings.m_basebandGain = value; m_settings.m_basebandGain = value;
QString gainText; QString gainText = QStringLiteral("%1").arg(value, 2, 10, QLatin1Char('0'));
gainText.sprintf("%02d", value);
ui->gainBasebandText->setText(gainText); ui->gainBasebandText->setText(gainText);
sendSettings(); sendSettings();

View File

@ -15,9 +15,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h> #include <cstdio>
#include <stdio.h>
#include <errno.h> #include <errno.h>
#include "testsourceworker.h" #include "testsourceworker.h"

View File

@ -1,7 +1,3 @@
if(WIN32)
link_directories(${BOOST_LIBRARYDIR})
endif()
project(usrpinput) project(usrpinput)
set(usrpinput_SOURCES set(usrpinput_SOURCES

View File

@ -27,7 +27,7 @@
#include <libgen.h> #include <libgen.h>
#endif #endif
#if !defined(__WINDOWS__) && !defined(__APPLE__) #if !defined(_WIN32) && !defined(__APPLE__)
#include <termios.h> #include <termios.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <linux/serial.h> #include <linux/serial.h>
@ -51,7 +51,7 @@ AMBEEngine::~AMBEEngine()
qDebug("AMBEEngine::~AMBEEngine: %lu controllers", m_controllers.size()); qDebug("AMBEEngine::~AMBEEngine: %lu controllers", m_controllers.size());
} }
#if defined(__WINDOWS__) #if defined(_WIN32)
void AMBEEngine::getComList() void AMBEEngine::getComList()
{ {
m_comList.clear(); m_comList.clear();
@ -119,7 +119,7 @@ void AMBEEngine::getComList()
} }
#endif // not Windows nor Apple #endif // not Windows nor Apple
#if !defined(__WINDOWS__) && !defined(__APPLE__) #if !defined(_WIN32) && !defined(__APPLE__)
void AMBEEngine::register_comport( void AMBEEngine::register_comport(
std::vector<std::string>& comList, std::vector<std::string>& comList,
std::vector<std::string>& comList8250, std::vector<std::string>& comList8250,

View File

@ -73,7 +73,7 @@ private:
std::string device; std::string device;
}; };
#ifndef __WINDOWS__ #ifndef _WIN32
static std::string get_driver(const std::string& tty); static std::string get_driver(const std::string& tty);
static void register_comport(std::vector<std::string>& comList, std::vector<std::string>& comList8250, const std::string& dir); static void register_comport(std::vector<std::string>& comList, std::vector<std::string>& comList8250, const std::string& dir);
static void probe_serial8250_comports(std::vector<std::string>& comList, std::vector<std::string> comList8250); static void probe_serial8250_comports(std::vector<std::string>& comList, std::vector<std::string> comList8250);

View File

@ -25,8 +25,7 @@
#ifndef SDRBASE_AUDIO_AUDIOCOMPRESSORSND_H_ #ifndef SDRBASE_AUDIO_AUDIOCOMPRESSORSND_H_
#define SDRBASE_AUDIO_AUDIOCOMPRESSORSND_H_ #define SDRBASE_AUDIO_AUDIOCOMPRESSORSND_H_
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
// maximum number of samples in the delay buffer // maximum number of samples in the delay buffer
#define AUDIOCOMPRESSORSND_SF_COMPRESSOR_MAXDELAY 1024 #define AUDIOCOMPRESSORSND_SF_COMPRESSOR_MAXDELAY 1024
@ -161,7 +160,7 @@ private:
static inline float fixf(float v, float def){ static inline float fixf(float v, float def){
// fix NaN and infinity values that sneak in... not sure why this is needed, but it is // fix NaN and infinity values that sneak in... not sure why this is needed, but it is
if (isnan(v) || isinf(v)) if (std::isnan(v) || std::isinf(v))
return def; return def;
return v; return v;
} }

View File

@ -15,8 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
#include <algorithm> #include <algorithm>
#include <QDebug> #include <QDebug>

View File

@ -67,7 +67,7 @@ Command::~Command()
{ {
if (m_currentProcess) if (m_currentProcess)
{ {
#if QT_VERSION < 0x051000 #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
disconnect(m_currentProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError))); disconnect(m_currentProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));
#else #else
disconnect(m_currentProcess, SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError))); disconnect(m_currentProcess, SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));
@ -193,7 +193,7 @@ void Command::run(const QString& apiAddress, int apiPort, int deviceSetIndex)
m_isInError = false; m_isInError = false;
m_hasExited = false; m_hasExited = false;
#if QT_VERSION < 0x051000 #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
connect(m_currentProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError))); connect(m_currentProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));
#else #else
connect(m_currentProcess, SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError))); connect(m_currentProcess, SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));
@ -266,7 +266,7 @@ void Command::processError(QProcess::ProcessError error)
{ {
m_log = m_currentProcess->readAllStandardOutput(); m_log = m_currentProcess->readAllStandardOutput();
#if QT_VERSION < 0x051000 #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
disconnect(m_currentProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError))); disconnect(m_currentProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));
#else #else
disconnect(m_currentProcess, SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError))); disconnect(m_currentProcess, SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));
@ -288,7 +288,7 @@ void Command::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
m_hasExited = true; m_hasExited = true;
m_log = m_currentProcess->readAllStandardOutput(); m_log = m_currentProcess->readAllStandardOutput();
#if QT_VERSION < 0x051000 #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
disconnect(m_currentProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError))); disconnect(m_currentProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));
#else #else
disconnect(m_currentProcess, SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError))); disconnect(m_currentProcess, SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));

View File

@ -15,11 +15,9 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <math.h> #include <cmath>
#include "dsp/afsquelch.h" #include "dsp/afsquelch.h"
#undef M_PI
#define M_PI 3.14159265358979323846
AFSquelch::AFSquelch() : AFSquelch::AFSquelch() :
m_nbAvg(128), m_nbAvg(128),

View File

@ -17,7 +17,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define _USE_MATH_DEFINES
#include <cmath> #include <cmath>
#include "dsp/ctcssdetector.h" #include "dsp/ctcssdetector.h"

View File

@ -6,12 +6,11 @@
#define _FFTFILT_H #define _FFTFILT_H
#include <complex> #include <complex>
#include <cmath>
#include "gfft.h" #include "gfft.h"
#include "export.h" #include "export.h"
#undef M_PI
#define M_PI 3.14159265358979323846
//---------------------------------------------------------------------- //----------------------------------------------------------------------
class SDRBASE_API fftfilt { class SDRBASE_API fftfilt {

View File

@ -20,14 +20,10 @@
#define INCLUDE_FFTWINDOW_H #define INCLUDE_FFTWINDOW_H
#include <vector> #include <vector>
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
#include "dsp/dsptypes.h" #include "dsp/dsptypes.h"
#include "export.h" #include "export.h"
#undef M_PI
#define M_PI 3.14159265358979323846
class SDRBASE_API FFTWindow { class SDRBASE_API FFTWindow {
public: public:
enum Function { enum Function {

View File

@ -52,6 +52,19 @@ void generateLowPassFilter(int nTaps, double sampleRate, double cutoff, std::vec
int n = i - (nTaps - 1) / 2; int n = i - (nTaps - 1) / 2;
taps[i] *= 0.42 + 0.5 * cos((2.0 * M_PI * n) / nTaps) + 0.08 * cos((4.0 * M_PI * n) / nTaps); taps[i] *= 0.42 + 0.5 * cos((2.0 * M_PI * n) / nTaps) + 0.08 * cos((4.0 * M_PI * n) / nTaps);
} }
Real sum = 0;
size_t i;
for (i = 0; i < taps.size() - 1; ++i) {
sum += taps[i] * 2.0;
}
sum += taps[i];
for (i = 0; i < taps.size(); ++i) {
taps[i] /= sum;
}
} }
} }

View File

@ -18,9 +18,9 @@
#pragma once #pragma once
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
#include "dsp/dsptypes.h" #include "dsp/dsptypes.h"
#include "dsp/misc.h"
#include "export.h" #include "export.h"
namespace FirFilterGenerators namespace FirFilterGenerators
@ -75,22 +75,6 @@ protected:
} }
} }
void normalize(Real sum_fix = 0.0)
{
Real sum = 0;
size_t i;
for (i = 0; i < m_taps.size() - 1; ++i) {
sum += m_taps[i] * 2.0;
}
sum += m_taps[i] + sum_fix;
for (i = 0; i < m_taps.size(); ++i) {
m_taps[i] /= sum;
}
}
protected: protected:
std::vector<Real> m_taps; std::vector<Real> m_taps;
std::vector<Type> m_samples; std::vector<Type> m_samples;
@ -105,7 +89,6 @@ public:
{ {
this->init(nTaps); this->init(nTaps);
FirFilterGenerators::generateLowPassFilter(nTaps, sampleRate, cutoff, this->m_taps); FirFilterGenerators::generateLowPassFilter(nTaps, sampleRate, cutoff, this->m_taps);
this->normalize();
} }
}; };
@ -130,7 +113,6 @@ struct Bandpass : public FirFilter<T>
} }
this->m_taps[this->m_taps.size() - 1] += 1; this->m_taps[this->m_taps.size() - 1] += 1;
this->normalize(-1.0);
} }
}; };
@ -147,6 +129,5 @@ struct Highpass : public FirFilter<T>
} }
this->m_taps[this->m_taps.size() - 1] += 1; this->m_taps[this->m_taps.size() - 1] += 1;
this->normalize(-1.0);
} }
}; };

View File

@ -16,7 +16,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#define _USE_MATH_DEFINES
#include <cmath> #include <cmath>
#include <QDebug> #include <QDebug>
#include "dsp/fmpreemphasis.h" #include "dsp/fmpreemphasis.h"

View File

@ -22,8 +22,7 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include "freqlockcomplex.h" #include "freqlockcomplex.h"
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
FreqLockComplex::FreqLockComplex() : FreqLockComplex::FreqLockComplex() :
m_a0(0.998), m_a0(0.998),

View File

@ -26,7 +26,6 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <assert.h>
template <typename Type, uint32_t Order> class IIRFilter template <typename Type, uint32_t Order> class IIRFilter
{ {
@ -61,8 +60,6 @@ private:
template <typename Type, uint32_t Order> template <typename Type, uint32_t Order>
IIRFilter<Type, Order>::IIRFilter(const Type *a, const Type *b) IIRFilter<Type, Order>::IIRFilter(const Type *a, const Type *b)
{ {
assert(Order > 1);
m_a = new Type[Order+1]; m_a = new Type[Order+1];
m_b = new Type[Order+1]; m_b = new Type[Order+1];
m_x = new Type[Order]; m_x = new Type[Order];

View File

@ -1,5 +1,4 @@
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
#include <vector> #include <vector>
#include "dsp/interpolator.h" #include "dsp/interpolator.h"

View File

@ -24,10 +24,7 @@
#ifndef _MISC_H #ifndef _MISC_H
#define _MISC_H #define _MISC_H
#include <math.h> #include <cmath>
#undef M_PI
#define M_PI 3.14159265358979323846
inline float sinc(float x) inline float sinc(float x)
{ {
@ -39,7 +36,8 @@ inline float cosc(float x)
return (fabs(x) < 1e-10) ? 0.0 : ((1.0 - cos(M_PI * x)) / (M_PI * x)); return (fabs(x) < 1e-10) ? 0.0 : ((1.0 - cos(M_PI * x)) / (M_PI * x));
} }
inline float clamp(float x, float min, float max) template<typename T>
inline T clamp(T x, T min, T max)
{ {
return (x < min) ? min : ((x > max) ? max : x); return (x < min) ? min : ((x > max) ? max : x);
} }

View File

@ -17,13 +17,10 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QtGlobal> #include <QtGlobal>
#include <stdio.h> #include <cstdio>
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
#include "dsp/nco.h" #include "dsp/nco.h"
#undef M_PI
#define M_PI 3.14159265358979323846
Real NCO::m_table[NCO::TableSize]; Real NCO::m_table[NCO::TableSize];
bool NCO::m_tableInitialized = false; bool NCO::m_tableInitialized = false;

View File

@ -17,13 +17,9 @@
#include <QtGlobal> #include <QtGlobal>
#include <stdio.h> #include <stdio.h>
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
#include "dsp/ncof.h" #include "dsp/ncof.h"
#undef M_PI
#define M_PI 3.14159265358979323846
Real NCOF::m_table[NCOF::TableSize+1]; Real NCOF::m_table[NCOF::TableSize+1];
bool NCOF::m_tableInitialized = false; bool NCOF::m_tableInitialized = false;
float NCOF::m_tableSizeLimit = (float) NCOF::TableSize; float NCOF::m_tableSizeLimit = (float) NCOF::TableSize;

View File

@ -19,11 +19,9 @@
#ifndef INCLUDE_DSP_PHASEDISCRI_H_ #ifndef INCLUDE_DSP_PHASEDISCRI_H_
#define INCLUDE_DSP_PHASEDISCRI_H_ #define INCLUDE_DSP_PHASEDISCRI_H_
#include <cmath>
#include "dsp/dsptypes.h" #include "dsp/dsptypes.h"
#undef M_PI
#define M_PI 3.14159265358979323846
class PhaseDiscriminators class PhaseDiscriminators
{ {
public: public:
@ -167,8 +165,8 @@ private:
} }
#define PI_FLOAT 3.14159265f #define PI_FLOAT float(M_PI)
#define PIBY2_FLOAT 1.5707963f #define PIBY2_FLOAT float(M_PI_2)
// |error| < 0.005 // |error| < 0.005
float atan2_approximation2( float y, float x ) float atan2_approximation2( float y, float x )
{ {

View File

@ -16,11 +16,9 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <math.h> #include <cmath>
#include "dsp/phaselock.h" #include "dsp/phaselock.h"
#undef M_PI
#define M_PI 3.14159265358979323846
// Construct phase-locked loop. // Construct phase-locked loop.
PhaseLock::PhaseLock(Real freq, Real bandwidth, Real minsignal) PhaseLock::PhaseLock(Real freq, Real bandwidth, Real minsignal)

View File

@ -22,8 +22,7 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <complex.h> #include <complex.h>
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
#include "phaselockcomplex.h" #include "phaselockcomplex.h"
PhaseLockComplex::PhaseLockComplex() : PhaseLockComplex::PhaseLockComplex() :

View File

@ -16,8 +16,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
#include "projector.h" #include "projector.h"
Projector::Projector(ProjectionType projectionType) : Projector::Projector(ProjectionType projectionType) :

View File

@ -19,8 +19,7 @@
#ifndef INCLUDE_RAISEDCOSINE_H #ifndef INCLUDE_RAISEDCOSINE_H
#define INCLUDE_RAISEDCOSINE_H #define INCLUDE_RAISEDCOSINE_H
#define _USE_MATH_DEFINES #include <cmath>
#include <math.h>
#include "dsp/dsptypes.h" #include "dsp/dsptypes.h"
// Raised-cosine low-pass filter for pulse shaping, without intersymbol interference (ISI) // Raised-cosine low-pass filter for pulse shaping, without intersymbol interference (ISI)

View File

@ -15,12 +15,9 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <math.h> #include <cmath>
#include "recursivefilters.h" #include "recursivefilters.h"
#undef M_PI
#define M_PI 3.14159265358979323846
SecondOrderRecursiveFilter::SecondOrderRecursiveFilter(float samplingFrequency, float centerFrequency, float r) : SecondOrderRecursiveFilter::SecondOrderRecursiveFilter(float samplingFrequency, float centerFrequency, float r) :
m_r(r), m_r(r),
m_frequencyRatio(centerFrequency/samplingFrequency), m_frequencyRatio(centerFrequency/samplingFrequency),

View File

@ -16,7 +16,6 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <algorithm> #include <algorithm>
#include <assert.h>
#include "samplesourcefifodb.h" #include "samplesourcefifodb.h"
SampleSourceFifoDB::SampleSourceFifoDB(uint32_t size, QObject* parent) : SampleSourceFifoDB::SampleSourceFifoDB(uint32_t size, QObject* parent) :
@ -60,7 +59,7 @@ void SampleSourceFifoDB::init()
void SampleSourceFifoDB::readAdvance(SampleVector::iterator& readUntil, unsigned int nbSamples) void SampleSourceFifoDB::readAdvance(SampleVector::iterator& readUntil, unsigned int nbSamples)
{ {
// QMutexLocker mutexLocker(&m_mutex); // QMutexLocker mutexLocker(&m_mutex);
assert(nbSamples <= m_size/2); nbSamples = nbSamples > m_size/2 ? m_size/2 : nbSamples;
emit dataWrite(nbSamples); emit dataWrite(nbSamples);
m_ir = (m_ir + nbSamples) % m_size; m_ir = (m_ir + nbSamples) % m_size;
@ -71,7 +70,7 @@ void SampleSourceFifoDB::readAdvance(SampleVector::iterator& readUntil, unsigned
void SampleSourceFifoDB::readAdvance(SampleVector::const_iterator& readUntil, unsigned int nbSamples) void SampleSourceFifoDB::readAdvance(SampleVector::const_iterator& readUntil, unsigned int nbSamples)
{ {
// QMutexLocker mutexLocker(&m_mutex); // QMutexLocker mutexLocker(&m_mutex);
assert(nbSamples <= m_size/2); nbSamples = nbSamples > m_size/2 ? m_size/2 : nbSamples;
emit dataWrite(nbSamples); emit dataWrite(nbSamples);
m_ir = (m_ir + nbSamples) % m_size; m_ir = (m_ir + nbSamples) % m_size;

View File

@ -21,7 +21,6 @@
#include <QObject> #include <QObject>
#include <QMutex> #include <QMutex>
#include <stdint.h> #include <stdint.h>
#include <assert.h>
#include "export.h" #include "export.h"
#include "dsp/dsptypes.h" #include "dsp/dsptypes.h"

View File

@ -4,15 +4,13 @@
http://www.iowahills.com http://www.iowahills.com
*/ */
#include <math.h> #include <cmath>
#include <new> #include <new>
#include <iostream> #include <iostream>
#include "wfir.h" #include "wfir.h"
#undef M_PI #define M_2PI (2*M_PI)
#define M_PI 3.14159265358979323846
#define M_2PI 6.28318530717958647692
// This first calculates the impulse response for a rectangular window. // This first calculates the impulse response for a rectangular window.
// It then applies the windowing function of choice to the impulse response. // It then applies the windowing function of choice to the impulse response.

View File

@ -85,7 +85,7 @@ void MainCore::setLoggingOptions()
if (m_settings.getUseLogFile()) if (m_settings.getUseLogFile())
{ {
#if QT_VERSION >= 0x050400 #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QString appInfoStr(QString("%1 %2 Qt %3 %4b %5 %6 DSP Rx:%7b Tx:%8b PID %9") QString appInfoStr(QString("%1 %2 Qt %3 %4b %5 %6 DSP Rx:%7b Tx:%8b PID %9")
.arg(QCoreApplication::applicationName()) .arg(QCoreApplication::applicationName())
.arg(QCoreApplication::applicationVersion()) .arg(QCoreApplication::applicationVersion())

View File

@ -17,7 +17,6 @@
#include "azel.h" #include "azel.h"
#define _USE_MATH_DEFINES
#include <cmath> #include <cmath>
// Calculate cartesian distance between two points // Calculate cartesian distance between two points

View File

@ -17,18 +17,16 @@
#include "util/db.h" #include "util/db.h"
#include <cmath> #include <cmath>
#include <cassert>
double CalcDb::dbPower(double magsq, double floor) double CalcDb::dbPower(double magsq, double floor)
{ {
assert(floor > 0.0); if (floor <= 0.0) {
return -100.0;
if (magsq > floor)
{
return 10.0 * log10(magsq);
} }
else
{ if (magsq > floor) {
return 10.0 * log10(magsq);
} else {
return 10.0 * log10(floor); return 10.0 * log10(floor);
} }
} }

View File

@ -18,7 +18,7 @@
#include <string.h> #include <string.h>
#include <regex> #include <regex>
#if defined(__WINDOWS__) #if defined(_WIN32)
#include <Windows.h> #include <Windows.h>
#include <winbase.h> #include <winbase.h>
#include <tchar.h> #include <tchar.h>
@ -31,7 +31,7 @@
#include "serialutil.h" #include "serialutil.h"
#if defined(__WINDOWS__) #if defined(_WIN32)
void SerialUtil::getComPorts(std::vector<std::string>& comPorts, const std::string& regexStr) void SerialUtil::getComPorts(std::vector<std::string>& comPorts, const std::string& regexStr)
{ {
(void) regexStr; (void) regexStr;

View File

@ -16,6 +16,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QtGlobal>
#include "util/syncmessenger.h" #include "util/syncmessenger.h"
#include "util/message.h" #include "util/message.h"
@ -34,14 +36,23 @@ int SyncMessenger::sendWait(Message& message, unsigned long msPollTime)
{ {
m_message = &message; m_message = &message;
m_mutex.lock(); m_mutex.lock();
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
m_complete.storeRelaxed(0);
#else
m_complete.store(0); m_complete.store(0);
#endif
emit messageSent(); emit messageSent();
while (!m_complete.load()) #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
{ while (!m_complete.loadRelaxed()) {
m_waitCondition.wait(&m_mutex, msPollTime); m_waitCondition.wait(&m_mutex, msPollTime);
} }
#else
while (!m_complete.load()) {
m_waitCondition.wait(&m_mutex, msPollTime);
}
#endif
int result = m_result; int result = m_result;
m_mutex.unlock(); m_mutex.unlock();
@ -52,7 +63,11 @@ int SyncMessenger::sendWait(Message& message, unsigned long msPollTime)
void SyncMessenger::done(int result) void SyncMessenger::done(int result)
{ {
m_result = result; m_result = result;
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
m_complete.storeRelaxed(1);
#else
m_complete.store(1); m_complete.store(1);
#endif
m_waitCondition.wakeAll(); m_waitCondition.wakeAll();
} }

View File

@ -24,8 +24,6 @@
#include <QUdpSocket> #include <QUdpSocket>
#include <QHostAddress> #include <QHostAddress>
#include <cassert>
template<typename T> template<typename T>
class UDPSinkUtil class UDPSinkUtil
{ {
@ -37,7 +35,6 @@ public:
m_port(9999), m_port(9999),
m_sampleBufferIndex(0) m_sampleBufferIndex(0)
{ {
assert(m_udpSamples > 0);
m_sampleBuffer = new T[m_udpSamples]; m_sampleBuffer = new T[m_udpSamples];
m_socket = new QUdpSocket(parent); m_socket = new QUdpSocket(parent);
} }
@ -49,7 +46,6 @@ public:
m_port(port), m_port(port),
m_sampleBufferIndex(0) m_sampleBufferIndex(0)
{ {
assert(m_udpSamples > 0);
m_sampleBuffer = new T[m_udpSamples]; m_sampleBuffer = new T[m_udpSamples];
m_socket = new QUdpSocket(parent); m_socket = new QUdpSocket(parent);
} }
@ -61,7 +57,6 @@ public:
m_port(port), m_port(port),
m_sampleBufferIndex(0) m_sampleBufferIndex(0)
{ {
assert(m_udpSamples > 0);
m_sampleBuffer = new T[m_udpSamples]; m_sampleBuffer = new T[m_udpSamples];
m_socket = new QUdpSocket(parent); m_socket = new QUdpSocket(parent);
} }

View File

@ -102,7 +102,7 @@ int WebAPIAdapter::instanceSummary(
response.setDspRxBits(SDR_RX_SAMP_SZ); response.setDspRxBits(SDR_RX_SAMP_SZ);
response.setDspTxBits(SDR_TX_SAMP_SZ); response.setDspTxBits(SDR_TX_SAMP_SZ);
response.setPid(qApp->applicationPid()); response.setPid(qApp->applicationPid());
#if QT_VERSION >= 0x050400 #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
*response.getArchitecture() = QString(QSysInfo::currentCpuArchitecture()); *response.getArchitecture() = QString(QSysInfo::currentCpuArchitecture());
*response.getOs() = QString(QSysInfo::prettyProductName()); *response.getOs() = QString(QSysInfo::prettyProductName());
#endif #endif

View File

@ -232,7 +232,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${OPENGL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
) )
add_library(sdrgui SHARED add_library(sdrgui SHARED
${sdrgui_SOURCES} ${sdrgui_SOURCES}

View File

@ -16,6 +16,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QtGlobal>
#include <QDebug> #include <QDebug>
#include <QMutexLocker> #include <QMutexLocker>
@ -619,15 +620,27 @@ int ScopeVis::processTraces(const SampleVector::const_iterator& cbegin, const Sa
// display only at trace end if trace time is less than 1 second // display only at trace end if trace time is less than 1 second
if (traceTime < 1.0f) if (traceTime < 1.0f)
{ {
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
if (m_glScope->getProcessingTraceIndex().loadRelaxed() < 0) {
m_glScope->newTraces(m_traces.m_traces, m_traces.currentBufferIndex(), &m_traces.m_projectionTypes);
}
#else
if (m_glScope->getProcessingTraceIndex().load() < 0) { if (m_glScope->getProcessingTraceIndex().load() < 0) {
m_glScope->newTraces(m_traces.m_traces, m_traces.currentBufferIndex(), &m_traces.m_projectionTypes); m_glScope->newTraces(m_traces.m_traces, m_traces.currentBufferIndex(), &m_traces.m_projectionTypes);
} }
#endif
} }
// switch to next buffer only if it is not being processed by the scope // switch to next buffer only if it is not being processed by the scope
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
if (m_glScope->getProcessingTraceIndex().loadRelaxed() != (((int) m_traces.currentBufferIndex() + 1) % 2)) {
m_traces.switchBuffer();
}
#else
if (m_glScope->getProcessingTraceIndex().load() != (((int) m_traces.currentBufferIndex() + 1) % 2)) { if (m_glScope->getProcessingTraceIndex().load() != (((int) m_traces.currentBufferIndex() + 1) % 2)) {
m_traces.switchBuffer(); m_traces.switchBuffer();
} }
#endif
return end - begin; // return remainder count return end - begin; // return remainder count
} }

View File

@ -25,7 +25,7 @@
#include <algorithm> #include <algorithm>
#include <utility> #include <utility>
#include <math.h> #include <cmath>
#include <stdint.h> #include <stdint.h>
#include <vector> #include <vector>
@ -37,8 +37,6 @@
#include "util/message.h" #include "util/message.h"
#include "util/doublebuffer.h" #include "util/doublebuffer.h"
#undef M_PI
#define M_PI 3.14159265358979323846
class GLScope; class GLScope;

Some files were not shown because too many files have changed in this diff Show More