From 49fd49b4d65845c83286014733f743b8fe257010 Mon Sep 17 00:00:00 2001 From: ericek111 Date: Mon, 30 Aug 2021 01:07:40 +0200 Subject: [PATCH] soapy_source: refresh devices on start if none in devList --- soapy_source/src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/soapy_source/src/main.cpp b/soapy_source/src/main.cpp index e73a1f16..0145548b 100644 --- a/soapy_source/src/main.cpp +++ b/soapy_source/src/main.cpp @@ -296,6 +296,14 @@ private: static void start(void* ctx) { SoapyModule* _this = (SoapyModule*)ctx; if (_this->running) { return; } + if (_this->devId < 0) { + _this->refresh(); + _this->selectDevice(config.conf["device"]); + if (_this->devId < 0) { + return; + } + } + _this->dev = SoapySDR::Device::make(_this->devArgs); _this->dev->setSampleRate(SOAPY_SDR_RX, _this->channelId, _this->sampleRate);