mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
HackRF plugins: correct start/stop sequences
This commit is contained in:
@@ -41,13 +41,11 @@ HackRFInputThread::~HackRFInputThread()
|
||||
|
||||
void HackRFInputThread::startWork()
|
||||
{
|
||||
//m_startWaitMutex.lock();
|
||||
m_running = true;
|
||||
m_startWaitMutex.lock();
|
||||
start();
|
||||
/*
|
||||
while(!m_running)
|
||||
m_startWaiter.wait(&m_startWaitMutex, 100);
|
||||
m_startWaitMutex.unlock();*/
|
||||
m_startWaitMutex.unlock();
|
||||
}
|
||||
|
||||
void HackRFInputThread::stopWork()
|
||||
@@ -76,11 +74,11 @@ void HackRFInputThread::run()
|
||||
{
|
||||
hackrf_error rc;
|
||||
|
||||
//m_running = true;
|
||||
m_startWaiter.wakeAll();
|
||||
|
||||
rc = (hackrf_error) hackrf_start_rx(m_dev, rx_callback, this);
|
||||
|
||||
m_running = true;
|
||||
m_startWaiter.wakeAll();
|
||||
|
||||
if (rc != HACKRF_SUCCESS)
|
||||
{
|
||||
qCritical("HackRFThread::run: failed to start HackRF Rx: %s", hackrf_error_name(rc));
|
||||
@@ -104,7 +102,7 @@ void HackRFInputThread::run()
|
||||
qDebug("HackRFThread::run: failed to stop HackRF Rx: %s", hackrf_error_name(rc));
|
||||
}
|
||||
|
||||
//m_running = false;
|
||||
m_running = false;
|
||||
}
|
||||
|
||||
// Decimate according to specified log2 (ex: log2=4 => decim=16)
|
||||
|
||||
Reference in New Issue
Block a user