diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 2ab0c9ed..a1cb663e 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -73,9 +73,12 @@ jobs: - name: Install libperseus-sdr run: git clone https://github.com/AlexandreRouma/libperseus-sdr ; cd libperseus-sdr ; mkdir build ; cd build ; cmake "-DLIBUSB_LIBRARIES=C:/Program Files/PothosSDR/lib/libusb-1.0.lib" "-DLIBUSB_INCLUDE_DIRS=C:/Program Files/PothosSDR/include/libusb-1.0" .. "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" ; cmake --build . --config Release ; mkdir "C:/Program Files/PothosSDR/include/perseus-sdr" ; cp Release/perseus-sdr.dll "C:/Program Files/PothosSDR/bin" ; cp Release/perseus-sdr.lib "C:/Program Files/PothosSDR/bin" ; cd .. ; xcopy "src" "C:/Program Files/PothosSDR/include/perseus-sdr" + - name: Install librfnm + run: git clone https://github.com/AlexandreRouma/librfnm ; cd librfnm ; mkdir build ; cd build ; cmake .. "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" ; cmake --build . --config Release ; cmake --install . + - name: Prepare CMake working-directory: ${{runner.workspace}}/build - run: cmake -DCOPY_MSVC_REDISTRIBUTABLES=ON "$Env:GITHUB_WORKSPACE" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DOPT_BUILD_BLADERF_SOURCE=ON -DOPT_BUILD_LIMESDR_SOURCE=ON -DOPT_BUILD_PERSEUS_SOURCE=ON -DOPT_BUILD_SDRPLAY_SOURCE=ON -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON -DOPT_BUILD_M17_DECODER=ON + run: cmake -DCOPY_MSVC_REDISTRIBUTABLES=ON "$Env:GITHUB_WORKSPACE" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DOPT_BUILD_BLADERF_SOURCE=ON -DOPT_BUILD_LIMESDR_SOURCE=ON -DOPT_BUILD_PERSEUS_SOURCE=ON -DOPT_BUILD_SDRPLAY_SOURCE=ON -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON -DOPT_BUILD_M17_DECODER=ON -DOPT_BUILD_RFNM_SOURCE=ON - name: Build working-directory: ${{runner.workspace}}/build diff --git a/make_windows_package.ps1 b/make_windows_package.ps1 index c048490c..bc233acb 100644 --- a/make_windows_package.ps1 +++ b/make_windows_package.ps1 @@ -39,6 +39,9 @@ cp $build_dir/source_modules/plutosdr_source/Release/plutosdr_source.dll sdrpp_w cp 'C:/Program Files/PothosSDR/bin/libiio.dll' sdrpp_windows_x64/ cp 'C:/Program Files/PothosSDR/bin/libad9361.dll' sdrpp_windows_x64/ +cp $build_dir/source_modules/rfnm_source/Release/rfnm_source.dll sdrpp_windows_x64/modules/ +cp 'C:/Program Files/RFNM/bin/rfnm.dll' sdrpp_windows_x64/ + cp $build_dir/source_modules/rfspace_source/Release/rfspace_source.dll sdrpp_windows_x64/modules/ cp $build_dir/source_modules/rtl_sdr_source/Release/rtl_sdr_source.dll sdrpp_windows_x64/modules/ diff --git a/readme.md b/readme.md index 55a91d36..47ba5123 100644 --- a/readme.md +++ b/readme.md @@ -330,7 +330,7 @@ Modules in beta are still included in releases for the most part but not enabled | network_source | Unfinished | - | OPT_BUILD_NETWORK_SOURCE | ✅ | ✅ | ⛔ | | perseus_source | Beta | libperseus-sdr | OPT_BUILD_PERSEUS_SOURCE | ⛔ | ✅ | ✅ | | plutosdr_source | Working | libiio, libad9361 | OPT_BUILD_PLUTOSDR_SOURCE | ✅ | ✅ | ✅ | -| rfnm_source | Beta | librfnm | OPT_BUILD_RFNM_SOURCE | ⛔ | ⛔ | ⛔ | +| rfnm_source | Beta | librfnm | OPT_BUILD_RFNM_SOURCE | ⛔ | ✅ | ✅ | | rfspace_source | Working | - | OPT_BUILD_RFSPACE_SOURCE | ✅ | ✅ | ✅ | | rtl_sdr_source | Working | librtlsdr | OPT_BUILD_RTL_SDR_SOURCE | ✅ | ✅ | ✅ | | rtl_tcp_source | Working | - | OPT_BUILD_RTL_TCP_SOURCE | ✅ | ✅ | ✅ | diff --git a/source_modules/rfnm_source/CMakeLists.txt b/source_modules/rfnm_source/CMakeLists.txt index 2685e452..264c906d 100644 --- a/source_modules/rfnm_source/CMakeLists.txt +++ b/source_modules/rfnm_source/CMakeLists.txt @@ -5,6 +5,6 @@ file(GLOB SRC "src/*.cpp") include(${SDRPP_MODULE_CMAKE}) -target_include_directories(rfnm_source PRIVATE "C:/Users/ryzerth/Documents/Code/librfnm/include/librfnm") -target_link_directories(rfnm_source PRIVATE "C:/Users/ryzerth/Documents/Code/librfnm/build/Release") -target_link_libraries(rfnm_source PRIVATE librfnm) \ No newline at end of file +target_include_directories(rfnm_source PRIVATE "C:/Program Files/RFNM/include") +target_link_directories(rfnm_source PRIVATE "C:/Program Files/RFNM/lib") +target_link_libraries(rfnm_source PRIVATE rfnm) \ No newline at end of file diff --git a/source_modules/rfnm_source/src/main.cpp b/source_modules/rfnm_source/src/main.cpp index da431355..7fe79b1c 100644 --- a/source_modules/rfnm_source/src/main.cpp +++ b/source_modules/rfnm_source/src/main.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include @@ -145,13 +145,13 @@ private: _this->openDev = new librfnm(librfnm_transport::LIBRFNM_TRANSPORT_USB, _this->selectedSerial); // Configure the device - _this->openDev->librfnm_s->rx.ch[0].enable = RFNM_CH_ON; - _this->openDev->librfnm_s->rx.ch[0].samp_freq_div_n = _this->samplerates[_this->srId]; - _this->openDev->librfnm_s->rx.ch[0].freq = _this->freq; - _this->openDev->librfnm_s->rx.ch[0].gain = _this->gain; - _this->openDev->librfnm_s->rx.ch[0].rfic_lpf_bw = 100; - _this->openDev->librfnm_s->rx.ch[0].fm_notch = _this->fmNotch ? rfnm_fm_notch::RFNM_FM_NOTCH_ON : rfnm_fm_notch::RFNM_FM_NOTCH_OFF; - _this->openDev->librfnm_s->rx.ch[0].path = _this->openDev->librfnm_s->rx.ch[0].path_preferred; + _this->openDev->s->rx.ch[0].enable = RFNM_CH_ON; + _this->openDev->s->rx.ch[0].samp_freq_div_n = _this->samplerates[_this->srId]; + _this->openDev->s->rx.ch[0].freq = _this->freq; + _this->openDev->s->rx.ch[0].gain = _this->gain; + _this->openDev->s->rx.ch[0].rfic_lpf_bw = 100; + _this->openDev->s->rx.ch[0].fm_notch = _this->fmNotch ? rfnm_fm_notch::RFNM_FM_NOTCH_ON : rfnm_fm_notch::RFNM_FM_NOTCH_OFF; + _this->openDev->s->rx.ch[0].path = _this->openDev->s->rx.ch[0].path_preferred; rfnm_api_failcode fail = _this->openDev->set(LIBRFNM_APPLY_CH0_RX); if (fail != rfnm_api_failcode::RFNM_API_OK) { flog::error("Failed to configure device: {}", (int)fail); @@ -189,7 +189,7 @@ private: _this->stream.clearWriteStop(); // Disable channel - _this->openDev->librfnm_s->rx.ch[0].enable = RFNM_CH_ON; + _this->openDev->s->rx.ch[0].enable = RFNM_CH_ON; _this->openDev->set(LIBRFNM_APPLY_CH0_RX); // Close device @@ -206,7 +206,7 @@ private: static void tune(double freq, void* ctx) { RFNMSourceModule* _this = (RFNMSourceModule*)ctx; if (_this->running) { - _this->openDev->librfnm_s->rx.ch[0].freq = freq; + _this->openDev->s->rx.ch[0].freq = freq; rfnm_api_failcode fail = _this->openDev->set(LIBRFNM_APPLY_CH0_RX); if (fail != rfnm_api_failcode::RFNM_API_OK) { flog::error("Failed to tune: {}", (int)fail); @@ -256,7 +256,7 @@ private: SmGui::FillWidth(); if (SmGui::SliderInt(CONCAT("##_rfnm_gain_", _this->name), &_this->gain, _this->gainMin, _this->gainMax)) { if (_this->running) { - _this->openDev->librfnm_s->rx.ch[0].gain = _this->gain; + _this->openDev->s->rx.ch[0].gain = _this->gain; rfnm_api_failcode fail = _this->openDev->set(LIBRFNM_APPLY_CH0_RX); } // TODO: Save @@ -264,7 +264,7 @@ private: if (SmGui::Checkbox(CONCAT("FM Notch##_rfnm_", _this->name), &_this->fmNotch)) { if (_this->running) { - _this->openDev->librfnm_s->rx.ch[0].fm_notch = _this->fmNotch ? rfnm_fm_notch::RFNM_FM_NOTCH_ON : rfnm_fm_notch::RFNM_FM_NOTCH_OFF; + _this->openDev->s->rx.ch[0].fm_notch = _this->fmNotch ? rfnm_fm_notch::RFNM_FM_NOTCH_ON : rfnm_fm_notch::RFNM_FM_NOTCH_OFF; rfnm_api_failcode fail = _this->openDev->set(LIBRFNM_APPLY_CH0_RX); } // TODO: Save