add rfnm_source to windows nightlies

This commit is contained in:
AlexandreRouma 2024-07-15 20:25:53 +02:00
parent e81db5d85c
commit f9d7d20073
5 changed files with 23 additions and 17 deletions

View File

@ -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

View File

@ -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/

View File

@ -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 | ✅ | ✅ | ✅ |

View File

@ -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)
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)

View File

@ -3,7 +3,7 @@
#include <gui/gui.h>
#include <gui/smgui.h>
#include <signal_path/signal_path.h>
#include <librfnm.h>
#include <librfnm/librfnm.h>
#include <core.h>
#include <utils/optionlist.h>
@ -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