1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-03 14:34:57 -04:00

Added possibility to specify devices that cannot be discovered automatically. This implements #445

This commit is contained in:
f4exb
2019-12-16 01:03:47 +01:00
parent 8d2f65f967
commit d0858f21fb
81 changed files with 448 additions and 102 deletions
@@ -295,11 +295,31 @@ bool PlutoSDRInput::openDevice()
else
{
qDebug("PlutoSDRInput::openDevice: open device here");
m_deviceShared.m_deviceParams = new DevicePlutoSDRParams();
char serial[256];
strcpy(serial, qPrintable(m_deviceAPI->getSamplingDeviceSerial()));
m_deviceShared.m_deviceParams->open(serial);
if (m_deviceAPI->getHardwareUserArguments().size() != 0)
{
QStringList kv = m_deviceAPI->getHardwareUserArguments().split('='); // expecting "uri=xxx"
if (kv.size() > 1)
{
if (kv.at(0) == "uri") {
m_deviceShared.m_deviceParams->openURI(kv.at(1).toStdString());
} else {
return false;
}
}
else
{
return false;
}
}
else
{
char serial[256];
strcpy(serial, qPrintable(m_deviceAPI->getSamplingDeviceSerial()));
m_deviceShared.m_deviceParams->open(serial);
}
}
m_deviceAPI->setBuddySharedPtr(&m_deviceShared); // propagate common parameters to API