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
@@ -65,8 +65,6 @@ bool HackRFInput::openDevice()
return false;
}
int device = m_deviceAPI->getSampleSourceSequence();
if (m_deviceAPI->getSinkBuddies().size() > 0)
{
DeviceSinkAPI *buddy = m_deviceAPI->getSinkBuddies()[0];
@@ -89,9 +87,9 @@ bool HackRFInput::openDevice()
}
else
{
if ((m_dev = DeviceHackRF::open_hackrf(device)) == 0)
if ((m_dev = DeviceHackRF::open_hackrf(qPrintable(m_deviceAPI->getSampleSourceSerial()))) == 0)
{
qCritical("HackRFInput::openDevice: could not open HackRF #%d", device);
qCritical("HackRFInput::openDevice: could not open HackRF %s", qPrintable(m_deviceAPI->getSampleSourceSerial()));
return false;
}