kopia lustrzana https://github.com/f4exb/sdrangel
LimeSDR input: moved thread suspend before device configuration update
rodzic
5cd430c245
commit
1a1c793014
|
@ -348,6 +348,19 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||||
bool threadStopped = false;
|
bool threadStopped = false;
|
||||||
// QMutexLocker mutexLocker(&m_mutex);
|
// QMutexLocker mutexLocker(&m_mutex);
|
||||||
|
|
||||||
|
if ((m_deviceShared.m_deviceParams->getDevice() != 0) && m_limeSDRInputThread && m_running &&
|
||||||
|
((m_settings.m_gain != settings.m_gain) ||
|
||||||
|
(m_settings.m_devSampleRate != settings.m_devSampleRate) ||
|
||||||
|
(m_settings.m_log2HardDecim != settings.m_log2HardDecim) ||
|
||||||
|
(m_settings.m_lpfBW != settings.m_lpfBW) ||
|
||||||
|
(m_settings.m_lpfFIRBW != settings.m_lpfFIRBW) ||
|
||||||
|
(m_settings.m_lpfFIREnable != settings.m_lpfFIREnable) ||
|
||||||
|
(m_settings.m_centerFrequency != settings.m_centerFrequency) || force))
|
||||||
|
{
|
||||||
|
m_limeSDRInputThread->stopWork();
|
||||||
|
threadStopped = true;
|
||||||
|
}
|
||||||
|
|
||||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
||||||
{
|
{
|
||||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||||
|
@ -366,12 +379,6 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||||
|
|
||||||
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
||||||
{
|
{
|
||||||
if (m_limeSDRInputThread && m_running && !threadStopped)
|
|
||||||
{
|
|
||||||
m_limeSDRInputThread->stopWork();
|
|
||||||
threadStopped = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LMS_SetGaindB(m_deviceShared.m_deviceParams->getDevice(),
|
if (LMS_SetGaindB(m_deviceShared.m_deviceParams->getDevice(),
|
||||||
LMS_CH_RX,
|
LMS_CH_RX,
|
||||||
m_deviceShared.m_channel,
|
m_deviceShared.m_channel,
|
||||||
|
@ -398,12 +405,6 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||||
|
|
||||||
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
||||||
{
|
{
|
||||||
if (m_limeSDRInputThread && m_running && !threadStopped)
|
|
||||||
{
|
|
||||||
m_limeSDRInputThread->stopWork();
|
|
||||||
threadStopped = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LMS_SetSampleRateDir(m_deviceShared.m_deviceParams->getDevice(),
|
if (LMS_SetSampleRateDir(m_deviceShared.m_deviceParams->getDevice(),
|
||||||
LMS_CH_RX,
|
LMS_CH_RX,
|
||||||
m_settings.m_devSampleRate,
|
m_settings.m_devSampleRate,
|
||||||
|
@ -431,12 +432,6 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||||
|
|
||||||
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
||||||
{
|
{
|
||||||
if (m_limeSDRInputThread && m_running && !threadStopped)
|
|
||||||
{
|
|
||||||
m_limeSDRInputThread->stopWork();
|
|
||||||
threadStopped = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LMS_SetLPFBW(m_deviceShared.m_deviceParams->getDevice(),
|
if (LMS_SetLPFBW(m_deviceShared.m_deviceParams->getDevice(),
|
||||||
LMS_CH_RX,
|
LMS_CH_RX,
|
||||||
m_deviceShared.m_channel,
|
m_deviceShared.m_channel,
|
||||||
|
@ -460,12 +455,6 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||||
|
|
||||||
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
||||||
{
|
{
|
||||||
if (m_limeSDRInputThread && m_running && !threadStopped)
|
|
||||||
{
|
|
||||||
m_limeSDRInputThread->stopWork();
|
|
||||||
threadStopped = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LMS_SetGFIRLPF(m_deviceShared.m_deviceParams->getDevice(),
|
if (LMS_SetGFIRLPF(m_deviceShared.m_deviceParams->getDevice(),
|
||||||
LMS_CH_RX,
|
LMS_CH_RX,
|
||||||
m_deviceShared.m_channel,
|
m_deviceShared.m_channel,
|
||||||
|
@ -505,12 +494,6 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||||
|
|
||||||
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
||||||
{
|
{
|
||||||
if (m_limeSDRInputThread && m_running && !threadStopped)
|
|
||||||
{
|
|
||||||
m_limeSDRInputThread->stopWork();
|
|
||||||
threadStopped = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LMS_SetLOFrequency(m_deviceShared.m_deviceParams->getDevice(),
|
if (LMS_SetLOFrequency(m_deviceShared.m_deviceParams->getDevice(),
|
||||||
LMS_CH_RX,
|
LMS_CH_RX,
|
||||||
m_deviceShared.m_channel, // same for both channels anyway but switches antenna port automatically
|
m_deviceShared.m_channel, // same for both channels anyway but switches antenna port automatically
|
||||||
|
|
Ładowanie…
Reference in New Issue