mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-17 13:19:25 -04:00
All device plugins: make sure start and stop are effective once only. PArt of #2159
This commit is contained in:
@@ -197,14 +197,14 @@ bool AirspyInput::start()
|
||||
{
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
|
||||
if (!m_dev) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_running) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!m_dev) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_airspyWorkerThread = new QThread();
|
||||
m_airspyWorker = new AirspyWorker(m_dev, &m_sampleFifo);
|
||||
m_airspyWorker->moveToThread(m_airspyWorkerThread);
|
||||
@@ -217,13 +217,13 @@ bool AirspyInput::start()
|
||||
m_airspyWorker->setLog2Decimation(m_settings.m_log2Decim);
|
||||
m_airspyWorker->setIQOrder(m_settings.m_iqOrder);
|
||||
m_airspyWorker->setFcPos((int) m_settings.m_fcPos);
|
||||
mutexLocker.unlock();
|
||||
|
||||
m_airspyWorkerThread->start();
|
||||
m_running = true;
|
||||
|
||||
mutexLocker.unlock();
|
||||
|
||||
qDebug("AirspyInput::startInput: started");
|
||||
applySettings(m_settings, QList<QString>(), true);
|
||||
m_running = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user