1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

HackRF: open device by serial number

This commit is contained in:
f4exb
2017-04-14 02:09:36 +02:00
parent 01b2c42a5f
commit 0a29f34b94
4 changed files with 32 additions and 7 deletions
@@ -60,7 +60,6 @@ bool HackRFOutput::openDevice()
}
m_sampleSourceFifo.resize(m_settings.m_devSampleRate/(1<<(m_settings.m_log2Interp <= 4 ? m_settings.m_log2Interp : 4)));
int device = m_deviceAPI->getSampleSinkSequence();
if (m_deviceAPI->getSourceBuddies().size() > 0)
{
@@ -84,9 +83,9 @@ bool HackRFOutput::openDevice()
}
else
{
if ((m_dev = DeviceHackRF::open_hackrf(device)) == 0)
if ((m_dev = DeviceHackRF::open_hackrf(qPrintable(m_deviceAPI->getSampleSinkSerial()))) == 0)
{
qCritical("HackRFOutput::openDevice: could not open HackRF #%d", device);
qCritical("HackRFOutput::openDevice: could not open HackRF %s", qPrintable(m_deviceAPI->getSampleSinkSerial()));
return false;
}