From 1870b358329bbb1cdb8d3816665a4e8c4802f8f9 Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 3 Aug 2020 21:36:23 +0200 Subject: [PATCH] SoapySDR: prepend the driver name to the device label so it can be differentiated if handled by SoapySDR remote --- devices/soapysdr/devicesoapysdrscan.cpp | 2 +- plugins/samplesink/soapysdroutput/readme.md | 10 ++++++---- plugins/samplesource/soapysdrinput/readme.md | 10 ++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/devices/soapysdr/devicesoapysdrscan.cpp b/devices/soapysdr/devicesoapysdrscan.cpp index 61bb5fbbd..56658cc1c 100644 --- a/devices/soapysdr/devicesoapysdrscan.cpp +++ b/devices/soapysdr/devicesoapysdrscan.cpp @@ -68,7 +68,7 @@ void DeviceSoapySDRScan::scan() SoapySDR::Kwargs::const_iterator kargIt; if ((kargIt = kit->find("label")) != kit->end()) { - m_deviceEnums.back().m_label = QString(kargIt->second.c_str()); + m_deviceEnums.back().m_label = QString("%1: %2").arg(m_deviceEnums.back().m_driverName).arg(kargIt->second.c_str()); } else { // if no label is registered for this device then create a label with the driver name and sequence m_deviceEnums.back().m_label = QString("%1-%2").arg(m_deviceEnums.back().m_driverName).arg(deviceSeq); } diff --git a/plugins/samplesink/soapysdroutput/readme.md b/plugins/samplesink/soapysdroutput/readme.md index 997a44bff..1956a740a 100644 --- a/plugins/samplesink/soapysdroutput/readme.md +++ b/plugins/samplesink/soapysdroutput/readme.md @@ -8,13 +8,15 @@ SoapySDR is a [C/C++ API](https://github.com/pothosware/SoapySDR/blob/master/inc SoapySDR devices appear in the list of available devices in the order they are listed in the API call to SoapySDR. If more than one device controlled by SoapySDR is listed then its sequence number is incremented like: - - SoapySDR[0:0] HackRF One... - - SoapySDR[1:0] HackRF One... + - SoapySDR[0:0] hackrf: HackRF One... + - SoapySDR[1:0] hackrf: HackRF One... + +The SoapySDR driver name appears right before the column If the same device exposes several channels they appear as distinct devices with the channel number incremented like: - - SoapySDR[1:0] LimeSDR... - - SoapySDR[1:1] LimeSDR... + - SoapySDR[1:0] lime: LimeSDR... + - SoapySDR[1:1] lime: LimeSDR... This works similarly to LimeSDR USB or BladeRF 2.0 micro diff --git a/plugins/samplesource/soapysdrinput/readme.md b/plugins/samplesource/soapysdrinput/readme.md index a02cd7781..a35a276ed 100644 --- a/plugins/samplesource/soapysdrinput/readme.md +++ b/plugins/samplesource/soapysdrinput/readme.md @@ -8,13 +8,15 @@ SoapySDR is a [C/C++ API](https://github.com/pothosware/SoapySDR/blob/master/inc SoapySDR devices appear in the list of available devices in the order they are listed in the API call to SoapySDR. If more than one device controlled by SoapySDR is listed then its sequence number is incremented like: - - SoapySDR[0:0] Generic RTL... - - SoapySDR[1:0] Generic RTL... + - SoapySDR[0:0] rtlsdr: Generic RTL... + - SoapySDR[1:0] rtlsdr: Generic RTL... + +The SoapySDR driver name appears right before the column If the same device exposes several channels they appear as distinct devices with the channel number incremented like: - - SoapySDR[1:0] LimeSDR... - - SoapySDR[1:1] LimeSDR... + - SoapySDR[1:0] lime: LimeSDR... + - SoapySDR[1:1] lime: LimeSDR... This works similarly to LimeSDR USB or BladeRF 2.0 micro