mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-10-01 09:16:39 -04:00
HackRF: Rx/Tx opem/close new style corrections
This commit is contained in:
parent
dea2764811
commit
651303e860
@ -84,12 +84,6 @@ bool HackRFOutput::openDevice()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (hackrf_init() != HACKRF_SUCCESS) // TODO: this may not work if several HackRF Devices are running concurrently. It should be handled globally in the application
|
|
||||||
{
|
|
||||||
qCritical("HackRFInput::openDevice: could not init HackRF");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((m_dev = DeviceHackRF::open_hackrf(device)) == 0)
|
if ((m_dev = DeviceHackRF::open_hackrf(device)) == 0)
|
||||||
{
|
{
|
||||||
qCritical("HackRFOutput::openDevice: could not open HackRF #%d", device);
|
qCritical("HackRFOutput::openDevice: could not open HackRF #%d", device);
|
||||||
@ -140,7 +134,7 @@ void HackRFOutput::closeDevice()
|
|||||||
if(m_dev != 0) // close HackRF
|
if(m_dev != 0) // close HackRF
|
||||||
{
|
{
|
||||||
hackrf_close(m_dev);
|
hackrf_close(m_dev);
|
||||||
hackrf_exit(); // TODO: this may not work if several HackRF Devices are running concurrently. It should be handled globally in the application
|
//hackrf_exit(); // TODO: this may not work if several HackRF Devices are running concurrently. It should be handled globally in the application
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,12 +89,6 @@ bool HackRFInput::openDevice()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (hackrf_init() != HACKRF_SUCCESS) // TODO: this may not work if several HackRF Devices are running concurrently. It should be handled globally in the application
|
|
||||||
{
|
|
||||||
qCritical("HackRFInput::openDevice: could not init HackRF");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((m_dev = DeviceHackRF::open_hackrf(device)) == 0)
|
if ((m_dev = DeviceHackRF::open_hackrf(device)) == 0)
|
||||||
{
|
{
|
||||||
qCritical("HackRFInput::openDevice: could not open HackRF #%d", device);
|
qCritical("HackRFInput::openDevice: could not open HackRF #%d", device);
|
||||||
@ -148,7 +142,7 @@ void HackRFInput::closeDevice()
|
|||||||
if(m_dev != 0) // close BladeRF
|
if(m_dev != 0) // close BladeRF
|
||||||
{
|
{
|
||||||
hackrf_close(m_dev);
|
hackrf_close(m_dev);
|
||||||
hackrf_exit(); // TODO: this may not work if several HackRF Devices are running concurrently. It should be handled globally in the application
|
//hackrf_exit(); // TODO: this may not work if several HackRF Devices are running concurrently. It should be handled globally in the application
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user