1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 14:04:46 -04:00

IQ swap: initial implementation in non MIMO plugins

This commit is contained in:
f4exb
2020-06-21 11:46:08 +02:00
parent ed5ebd6361
commit 24aa55027c
83 changed files with 4845 additions and 2834 deletions
+17 -6
View File
@@ -50,7 +50,7 @@ SDRPlayInput::SDRPlayInput(DeviceAPI *deviceAPI) :
m_variant(SDRPlayUndef),
m_settings(),
m_dev(0),
m_sdrPlayThread(0),
m_sdrPlayThread(nullptr),
m_deviceDescription("SDRPlay"),
m_devNumber(0),
m_running(false)
@@ -188,7 +188,7 @@ bool SDRPlayInput::start()
m_sdrPlayThread = new SDRPlayThread(m_dev, &m_sampleFifo);
m_sdrPlayThread->setLog2Decimation(m_settings.m_log2Decim);
m_sdrPlayThread->setFcPos((int) m_settings.m_fcPos);
m_sdrPlayThread->setIQOrder(m_settings.m_iqOrder);
m_sdrPlayThread->startWork();
// mutexLocker.unlock();
@@ -219,11 +219,11 @@ void SDRPlayInput::stop()
{
// QMutexLocker mutexLocker(&m_mutex);
if(m_sdrPlayThread != 0)
if(m_sdrPlayThread)
{
m_sdrPlayThread->stopWork();
delete m_sdrPlayThread;
m_sdrPlayThread = 0;
m_sdrPlayThread = nullptr;
}
m_running = false;
@@ -537,7 +537,7 @@ bool SDRPlayInput::applySettings(const SDRPlaySettings& settings, bool forwardCh
{
reverseAPIKeys.append("log2Decim");
if (m_sdrPlayThread != 0)
if (m_sdrPlayThread)
{
m_sdrPlayThread->setLog2Decimation(settings.m_log2Decim);
qDebug() << "SDRPlayInput::applySettings: set decimation to " << (1<<settings.m_log2Decim);
@@ -548,13 +548,24 @@ bool SDRPlayInput::applySettings(const SDRPlaySettings& settings, bool forwardCh
{
reverseAPIKeys.append("fcPos");
if (m_sdrPlayThread != 0)
if (m_sdrPlayThread)
{
m_sdrPlayThread->setFcPos((int) settings.m_fcPos);
qDebug() << "SDRPlayInput: set fc pos (enum) to " << (int) settings.m_fcPos;
}
}
if ((m_settings.m_iqOrder != settings.m_iqOrder) || force)
{
reverseAPIKeys.append("iqOrder");
if (m_sdrPlayThread)
{
m_sdrPlayThread->setIQOrder((int) settings.m_iqOrder);
qDebug() << "SDRPlayInput: set IQ order to " << (settings.m_iqOrder ? "IQ" : "QI");
}
}
if ((m_settings.m_centerFrequency != settings.m_centerFrequency) || force) {
reverseAPIKeys.append("centerFrequency");
}