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

HackRF: Rx/Tx opem/close new style

This commit is contained in:
f4exb
2017-04-14 01:41:02 +02:00
parent ecdc99f59b
commit dea2764811
5 changed files with 112 additions and 132 deletions
@@ -76,15 +76,26 @@ void HackRFInputThread::run()
rc = (hackrf_error) hackrf_start_rx(m_dev, rx_callback, this);
if (rc == HACKRF_SUCCESS)
{
qDebug("HackRFThread::run: started HackRF Rx");
}
else
{
qDebug("HackRFThread::run: failed to start HackRF Rx: %s", hackrf_error_name(rc));
}
m_running = true;
m_startWaiter.wakeAll();
if (rc != HACKRF_SUCCESS)
{
qCritical("HackRFThread::run: failed to start HackRF Rx: %s", hackrf_error_name(rc));
}
else
if (rc == HACKRF_SUCCESS)
{
if (hackrf_is_streaming(m_dev) == HACKRF_TRUE) {
qDebug("HackRFThread::run: HackRF is streaming");
} else {
qDebug("HackRFThread::run: HackRF is not streaming");
}
while ((m_running) && (hackrf_is_streaming(m_dev) == HACKRF_TRUE))
{
usleep(200000);