mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 13:47:01 -04:00
IQ swap: initial implementation in plugins
This commit is contained in:
@@ -45,7 +45,7 @@ FCDProPlusInput::FCDProPlusInput(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_dev(0),
|
||||
m_settings(),
|
||||
m_FCDThread(0),
|
||||
m_FCDThread(nullptr),
|
||||
m_deviceDescription(fcd_traits<ProPlus>::displayedName),
|
||||
m_running(false)
|
||||
{
|
||||
@@ -140,6 +140,9 @@ bool FCDProPlusInput::start()
|
||||
}
|
||||
|
||||
m_FCDThread = new FCDProPlusThread(&m_sampleFifo, &m_fcdFIFO);
|
||||
m_FCDThread->setLog2Decimation(m_settings.m_log2Decim);
|
||||
m_FCDThread->setFcPos(m_settings.m_fcPos);
|
||||
m_FCDThread->setIQOrder(m_settings.m_iqOrder);
|
||||
m_FCDThread->startWork();
|
||||
|
||||
// mutexLocker.unlock();
|
||||
@@ -375,7 +378,7 @@ void FCDProPlusInput::applySettings(const FCDProPlusSettings& settings, bool for
|
||||
reverseAPIKeys.append("log2Decim");
|
||||
forwardChange = true;
|
||||
|
||||
if (m_FCDThread != 0)
|
||||
if (m_FCDThread)
|
||||
{
|
||||
m_FCDThread->setLog2Decimation(settings.m_log2Decim);
|
||||
qDebug() << "FCDProPlusInput::applySettings: set decimation to " << (1<<settings.m_log2Decim);
|
||||
@@ -386,13 +389,24 @@ void FCDProPlusInput::applySettings(const FCDProPlusSettings& settings, bool for
|
||||
{
|
||||
reverseAPIKeys.append("fcPos");
|
||||
|
||||
if (m_FCDThread != 0) {
|
||||
if (m_FCDThread) {
|
||||
m_FCDThread->setFcPos((int) settings.m_fcPos);
|
||||
}
|
||||
|
||||
qDebug() << "FCDProPlusInput::applySettings: set fc pos (enum) to " << (int) settings.m_fcPos;
|
||||
}
|
||||
|
||||
if ((m_settings.m_iqOrder != settings.m_iqOrder) || force)
|
||||
{
|
||||
reverseAPIKeys.append("iqOrder");
|
||||
|
||||
if (m_FCDThread) {
|
||||
m_FCDThread->setIQOrder((int) settings.m_iqOrder);
|
||||
}
|
||||
|
||||
qDebug() << "FCDProPlusInput::applySettings: set IQ order to %s" << (settings.m_iqOrder ? "IQ" : "QI");
|
||||
}
|
||||
|
||||
if ((m_settings.m_lnaGain != settings.m_lnaGain) || force)
|
||||
{
|
||||
reverseAPIKeys.append("lnaGain");
|
||||
|
||||
Reference in New Issue
Block a user