From b1fbff05f318e53c351fa03c11de9335ea1b11b6 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 10 Feb 2018 21:50:57 +0100 Subject: [PATCH] Perseus: Debian and Windows build --- CMakeLists.txt | 3 +- debian/changelog | 10 +++++ debian/rules | 2 +- libperseus/CMakeLists.txt | 40 +++++++++++++++++++ libperseus/libperseus.pro | 37 +++++++++++++++++ plugins/samplesource/CMakeLists.txt | 1 + plugins/samplesource/perseus/perseusgui.ui | 2 +- sdrangel.windows.pro | 1 + .../sdrangel/examples/devicesets_config.py | 2 +- 9 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 libperseus/CMakeLists.txt create mode 100644 libperseus/libperseus.pro diff --git a/CMakeLists.txt b/CMakeLists.txt index ac8d8a3be..d414aabe2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,8 +283,9 @@ if (BUILD_DEBIAN) add_subdirectory(libhackrf) add_subdirectory(librtlsdr) add_subdirectory(libbladerf) - add_subdirectory(libmirisdr) add_subdirectory(liblimesuite) + add_subdirectory(libmirisdr) + add_subdirectory(libperseus) add_subdirectory(libiio) endif (BUILD_DEBIAN) diff --git a/debian/changelog b/debian/changelog index 8282b4cfc..5978e8a35 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +sdrangel (3.12.0-1) unstable; urgency=medium + + * Perseus support. + * 24 bit Rx DSP Debian builds + * DC and IQ correction fixes + * AirspyHF: fall back to official library support + * Test source: implemented phase imbalance + + -- Edouard Griffiths, F4EXB Sun, 11 Feb 2018 12:14:18 +0100 + sdrangel (3.11.1-1) unstable; urgency=medium * Replaced hardcoded bit scaling literals by defines. 24 bit sample option. diff --git a/debian/rules b/debian/rules index be75bab54..1d40d5da7 100755 --- a/debian/rules +++ b/debian/rules @@ -21,5 +21,5 @@ # dh_make generated override targets # This is example for Cmake (See https://bugs.debian.org/641051 ) override_dh_auto_configure: - dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/opt/sdrangel -DDEBUG_OUTPUT=ON -DBUILD_TYPE=DEBIAN -DLIBCM256CCSRC=/z1/development/cm256cc -DLIBDSDCCSRC=/z1/development/dsdcc -DLIBAIRSPYSRC=/z1/development/libairspy -DLIBAIRSPYHFSRC=/z1/softs/airspyhf -DLIBHACKRFSRC=/z1/development/hackrf/host -DLIBRTLSDRSRC=/z1/development/librtlsdr.f4exb -DLIBMBELIBSRC=/z1/development/mbelib -DLIBSERIALDVSRC=/z1/development/serialDV -DLIBBLADERFSRC=/z1/softs/bladeRF -DLIBBLADERFCOMMONSRC=/z1/softs/bladeRF/host/common -DLIBBLADERFLIBSRC=/z1/softs/bladeRF/host/libraries/libbladeRF -DLIBMIRISDRSRC=/z1/development/libmirisdr-4 -DLIBLIMESUITESRC=/z1/softs/LimeSuite -DLIBIIOSRC=/z1/softs/libiio + dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/opt/sdrangel -DDEBUG_OUTPUT=ON -DBUILD_TYPE=DEBIAN -DRX_SAMPLE_24BIT=ON -DLIBCM256CCSRC=/z1/development/cm256cc -DLIBDSDCCSRC=/z1/development/dsdcc -DLIBAIRSPYSRC=/z1/development/libairspy -DLIBAIRSPYHFSRC=/z1/softs/airspyhf -DLIBHACKRFSRC=/z1/development/hackrf/host -DLIBRTLSDRSRC=/z1/development/librtlsdr.f4exb -DLIBMBELIBSRC=/z1/development/mbelib -DLIBSERIALDVSRC=/z1/development/serialDV -DLIBBLADERFSRC=/z1/softs/bladeRF -DLIBBLADERFCOMMONSRC=/z1/softs/bladeRF/host/common -DLIBBLADERFLIBSRC=/z1/softs/bladeRF/host/libraries/libbladeRF -DLIBMIRISDRSRC=/z1/development/libmirisdr-4 -DLIBLIMESUITESRC=/z1/softs/LimeSuite -DLIBIIOSRC=/z1/softs/libiio diff --git a/libperseus/CMakeLists.txt b/libperseus/CMakeLists.txt new file mode 100644 index 000000000..7631982b4 --- /dev/null +++ b/libperseus/CMakeLists.txt @@ -0,0 +1,40 @@ +project(perseus) + +find_package(LibUSB) + +set(perseus_SOURCES + ${LIBPERSEUSSRC}/fifo.c + ${LIBPERSEUSSRC}/perseus24v11_512.c + ${LIBPERSEUSSRC}/perseus24v41_512.c + ${LIBPERSEUSSRC}/perseuserr.c + ${LIBPERSEUSSRC}/perseusfx2.c + ${LIBPERSEUSSRC}/perseus-in.c + ${LIBPERSEUSSRC}/perseus-sdr.c +) + +set(perseus_HEADERS + ${LIBPERSEUSSRC}/fifo.h + ${LIBPERSEUSSRC}/perseuserr.h + ${LIBPERSEUSSRC}/perseusfx2.h + ${LIBPERSEUSSRC}/perseus-in.h + ${LIBPERSEUSSRC}/perseus-sdr.h +) + +include_directories( + . + ${CMAKE_CURRENT_BINARY_DIR} + ${LIBUSB_INCLUDE_DIR} + ${LIBPERSEUSSRC} +) + +add_definitions(-DQT_SHARED) + +add_library(perseus SHARED + ${perseus_SOURCES} +) + +target_link_libraries(perseus + ${LIBUSB_LIBRARIES} +) + +install(TARGETS perseus DESTINATION lib) diff --git a/libperseus/libperseus.pro b/libperseus/libperseus.pro new file mode 100644 index 000000000..be75e0527 --- /dev/null +++ b/libperseus/libperseus.pro @@ -0,0 +1,37 @@ +#-------------------------------------------------------- +# +# Pro file for Android and Windows builds with Qt Creator +# +#-------------------------------------------------------- + +QT += core + +TEMPLATE = lib +TARGET = libperseus + +CONFIG(MINGW32):LIBPERSEUSSRC = "D:\softs\libperseus-sdr" +CONFIG(MINGW64):LIBPERSEUSSRC = "D:\softs\libperseus-sdr" +INCLUDEPATH += $$LIBPERSEUSSRC + +CONFIG(MINGW32):INCLUDEPATH += "D:\softs\libusb-1.0.20\include\libusb-1.0" +CONFIG(MINGW64):INCLUDEPATH += "D:\softs\libusb-1.0.20\include\libusb-1.0" + +SOURCES = $$LIBPERSEUSSRC/fifo.c\ + $$LIBPERSEUSSRC/perseus24v11_512.c\ + $$LIBPERSEUSSRC/perseus24v41_512.c\ + $$LIBPERSEUSSRC/perseuserr.c\ + $$LIBPERSEUSSRC/perseusfx2.c\ + $$LIBPERSEUSSRC/perseus-in.c\ + $$LIBPERSEUSSRC/perseus-sdr.c + +HEADERS = $$LIBPERSEUSSRC/fifo.h\ + $$LIBPERSEUSSRC/perseuserr.h\ + $$LIBPERSEUSSRC/perseusfx2.h\ + $$LIBPERSEUSSRC/perseus-in.h\ + $$LIBPERSEUSSRC/perseus-sdr.h + +CONFIG(MINGW32):LIBS += -LD:\softs\libusb-1.0.20\MinGW32\dll -llibusb-1.0 +CONFIG(MINGW64):LIBS += -LD:\softs\libusb-1.0.20\MinGW64\dll -llibusb-1.0 + +CONFIG(ANDROID):CONFIG += mobility +CONFIG(ANDROID):MOBILITY = diff --git a/plugins/samplesource/CMakeLists.txt b/plugins/samplesource/CMakeLists.txt index 4232c22f8..902b6b58b 100644 --- a/plugins/samplesource/CMakeLists.txt +++ b/plugins/samplesource/CMakeLists.txt @@ -88,6 +88,7 @@ if (BUILD_DEBIAN) add_subdirectory(bladerfinput) add_subdirectory(sdrplay) add_subdirectory(limesdrinput) + add_subdirectory(perseus) add_subdirectory(plutosdrinput) endif (BUILD_DEBIAN) diff --git a/plugins/samplesource/perseus/perseusgui.ui b/plugins/samplesource/perseus/perseusgui.ui index e823c3509..c448f4904 100644 --- a/plugins/samplesource/perseus/perseusgui.ui +++ b/plugins/samplesource/perseus/perseusgui.ui @@ -274,7 +274,7 @@ - Device sample rate in MS/s + Device sample rate in kS/s Qt::RightToLeft diff --git a/sdrangel.windows.pro b/sdrangel.windows.pro index c228d2ea2..13d93bd8e 100644 --- a/sdrangel.windows.pro +++ b/sdrangel.windows.pro @@ -23,6 +23,7 @@ SUBDIRS += libbladerf SUBDIRS += libhackrf SUBDIRS += libiio SUBDIRS += liblimesuite +SUBDIRS += libperseus SUBDIRS += librtlsdr SUBDIRS += libsqlite3 SUBDIRS += devices diff --git a/swagger/sdrangel/examples/devicesets_config.py b/swagger/sdrangel/examples/devicesets_config.py index a7b232a24..e572b6791 100755 --- a/swagger/sdrangel/examples/devicesets_config.py +++ b/swagger/sdrangel/examples/devicesets_config.py @@ -19,7 +19,7 @@ commands = [ ["/preset", "PATCH", None, {"deviceSetIndex": 1, "preset": {"groupName": "OM430", "centerFrequency": 439550000, "type": "R", "name": "F5ZKP Daemon RPi3 SUSE"}}, "load preset on Rx 1"], ["/deviceset", "POST", None, None, "add Rx 2 device set"], # ["/deviceset/2/device", "PUT", None, {"hwType": "SDRplay1"}, "setup SDRplay on Rx 2"], - ["/deviceset/2/device", "PUT", None, {"hwType": "AirspyHF"}, "setup Airspy HF+ on Rx 2"], + ["/deviceset/2/device", "PUT", None, {"hwType": "Perseus"}, "setup Perseus on Rx 2"], ["/preset", "PATCH", None, {"deviceSetIndex": 2, "preset": {"groupName": "40m", "centerFrequency": 7130000, "type": "R", "name": "SSB low"}}, "load preset on Rx 2"], ["/dvserial", "PATCH", {"dvserial": 1}, None, "set DV serial processing for AMBE frames decoding"], # ["/preset", "PATCH", None, {"deviceSetIndex": 0, "preset": {"groupName": "OM144", "centerFrequency": 145640000, "type": "R", "name": "Repeaters extended"}}, "load preset on Rx 0 twice"],