mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 17:58:43 -05:00
LimeSDR: corrected NCO de-tune when sample rate changes
This commit is contained in:
parent
50c39b90a1
commit
844628bc48
@ -484,6 +484,7 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
|||||||
bool suspendTxThread = false;
|
bool suspendTxThread = false;
|
||||||
bool suspendAllThread = false;
|
bool suspendAllThread = false;
|
||||||
bool doCalibration = false;
|
bool doCalibration = false;
|
||||||
|
bool forceNCOFrequency = false;
|
||||||
// QMutexLocker mutexLocker(&m_mutex);
|
// QMutexLocker mutexLocker(&m_mutex);
|
||||||
|
|
||||||
// determine if buddies threads or own thread need to be suspended
|
// determine if buddies threads or own thread need to be suspended
|
||||||
@ -614,6 +615,7 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
|||||||
m_deviceShared.m_deviceParams->m_log2OvSRTx = m_settings.m_log2HardInterp;
|
m_deviceShared.m_deviceParams->m_log2OvSRTx = m_settings.m_log2HardInterp;
|
||||||
m_deviceShared.m_deviceParams->m_sampleRate = m_settings.m_devSampleRate;
|
m_deviceShared.m_deviceParams->m_sampleRate = m_settings.m_devSampleRate;
|
||||||
doCalibration = true;
|
doCalibration = true;
|
||||||
|
forceNCOFrequency = true;
|
||||||
qDebug("LimeSDROutput::applySettings: set sample rate set to %d with oversampling of %d",
|
qDebug("LimeSDROutput::applySettings: set sample rate set to %d with oversampling of %d",
|
||||||
m_settings.m_devSampleRate,
|
m_settings.m_devSampleRate,
|
||||||
1<<m_settings.m_log2HardInterp);
|
1<<m_settings.m_log2HardInterp);
|
||||||
@ -688,7 +690,7 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((m_settings.m_ncoFrequency != settings.m_ncoFrequency) ||
|
if ((m_settings.m_ncoFrequency != settings.m_ncoFrequency) ||
|
||||||
(m_settings.m_ncoEnable != settings.m_ncoEnable) || force)
|
(m_settings.m_ncoEnable != settings.m_ncoEnable) || force || forceNCOFrequency)
|
||||||
{
|
{
|
||||||
m_settings.m_ncoFrequency = settings.m_ncoFrequency;
|
m_settings.m_ncoFrequency = settings.m_ncoFrequency;
|
||||||
m_settings.m_ncoEnable = settings.m_ncoEnable;
|
m_settings.m_ncoEnable = settings.m_ncoEnable;
|
||||||
|
@ -496,6 +496,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
|||||||
bool suspendAllThread = false;
|
bool suspendAllThread = false;
|
||||||
bool doCalibration = false;
|
bool doCalibration = false;
|
||||||
bool setAntennaAuto = false;
|
bool setAntennaAuto = false;
|
||||||
|
bool forceNCOFrequency = false;
|
||||||
// QMutexLocker mutexLocker(&m_mutex);
|
// QMutexLocker mutexLocker(&m_mutex);
|
||||||
|
|
||||||
// determine if buddies threads or own thread need to be suspended
|
// determine if buddies threads or own thread need to be suspended
|
||||||
@ -770,6 +771,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
|||||||
m_deviceShared.m_deviceParams->m_log2OvSRRx = m_settings.m_log2HardDecim;
|
m_deviceShared.m_deviceParams->m_log2OvSRRx = m_settings.m_log2HardDecim;
|
||||||
m_deviceShared.m_deviceParams->m_sampleRate = m_settings.m_devSampleRate;
|
m_deviceShared.m_deviceParams->m_sampleRate = m_settings.m_devSampleRate;
|
||||||
doCalibration = true;
|
doCalibration = true;
|
||||||
|
forceNCOFrequency = true;
|
||||||
qDebug("LimeSDRInput::applySettings: set sample rate set to %d with oversampling of %d",
|
qDebug("LimeSDRInput::applySettings: set sample rate set to %d with oversampling of %d",
|
||||||
m_settings.m_devSampleRate,
|
m_settings.m_devSampleRate,
|
||||||
1<<m_settings.m_log2HardDecim);
|
1<<m_settings.m_log2HardDecim);
|
||||||
@ -827,7 +829,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((m_settings.m_ncoFrequency != settings.m_ncoFrequency) ||
|
if ((m_settings.m_ncoFrequency != settings.m_ncoFrequency) ||
|
||||||
(m_settings.m_ncoEnable != settings.m_ncoEnable) || force)
|
(m_settings.m_ncoEnable != settings.m_ncoEnable) || force || forceNCOFrequency)
|
||||||
{
|
{
|
||||||
m_settings.m_ncoFrequency = settings.m_ncoFrequency;
|
m_settings.m_ncoFrequency = settings.m_ncoFrequency;
|
||||||
m_settings.m_ncoEnable = settings.m_ncoEnable;
|
m_settings.m_ncoEnable = settings.m_ncoEnable;
|
||||||
|
Loading…
Reference in New Issue
Block a user