1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

SoapySDR: prepend the driver name to the device label so it can be differentiated if handled by SoapySDR remote

This commit is contained in:
f4exb 2020-08-03 21:36:23 +02:00
parent 4088a23d0f
commit 1870b35832
3 changed files with 13 additions and 9 deletions

View File

@ -68,7 +68,7 @@ void DeviceSoapySDRScan::scan()
SoapySDR::Kwargs::const_iterator kargIt; SoapySDR::Kwargs::const_iterator kargIt;
if ((kargIt = kit->find("label")) != kit->end()) { 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 } 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); m_deviceEnums.back().m_label = QString("%1-%2").arg(m_deviceEnums.back().m_driverName).arg(deviceSeq);
} }

View File

@ -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 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[0:0] hackrf: HackRF One...
- SoapySDR[1:0] 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: If the same device exposes several channels they appear as distinct devices with the channel number incremented like:
- SoapySDR[1:0] LimeSDR... - SoapySDR[1:0] lime: LimeSDR...
- SoapySDR[1:1] LimeSDR... - SoapySDR[1:1] lime: LimeSDR...
This works similarly to LimeSDR USB or BladeRF 2.0 micro This works similarly to LimeSDR USB or BladeRF 2.0 micro

View File

@ -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 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[0:0] rtlsdr: Generic RTL...
- SoapySDR[1:0] 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: If the same device exposes several channels they appear as distinct devices with the channel number incremented like:
- SoapySDR[1:0] LimeSDR... - SoapySDR[1:0] lime: LimeSDR...
- SoapySDR[1:1] LimeSDR... - SoapySDR[1:1] lime: LimeSDR...
This works similarly to LimeSDR USB or BladeRF 2.0 micro This works similarly to LimeSDR USB or BladeRF 2.0 micro