1
0
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:
f4exb 2017-08-04 10:31:54 +02:00
parent 50c39b90a1
commit 844628bc48
2 changed files with 7 additions and 3 deletions

View File

@ -483,7 +483,8 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
bool suspendOwnThread = false;
bool suspendTxThread = false;
bool suspendAllThread = false;
bool doCalibration = false;
bool doCalibration = false;
bool forceNCOFrequency = false;
// QMutexLocker mutexLocker(&m_mutex);
// 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_sampleRate = m_settings.m_devSampleRate;
doCalibration = true;
forceNCOFrequency = true;
qDebug("LimeSDROutput::applySettings: set sample rate set to %d with oversampling of %d",
m_settings.m_devSampleRate,
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) ||
(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_ncoEnable = settings.m_ncoEnable;

View File

@ -496,6 +496,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
bool suspendAllThread = false;
bool doCalibration = false;
bool setAntennaAuto = false;
bool forceNCOFrequency = false;
// QMutexLocker mutexLocker(&m_mutex);
// 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_sampleRate = m_settings.m_devSampleRate;
doCalibration = true;
forceNCOFrequency = true;
qDebug("LimeSDRInput::applySettings: set sample rate set to %d with oversampling of %d",
m_settings.m_devSampleRate,
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) ||
(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_ncoEnable = settings.m_ncoEnable;