mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
DATV demod: do not update DVB framework unnecessarily (for channel center frequency and filter bandwidth changes)
This commit is contained in:
parent
d68f591c76
commit
f2e236d401
@ -1427,27 +1427,24 @@ void DATVDemod::applySettings(const DATVDemodSettings& settings, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
if ((m_settings.m_rfBandwidth != settings.m_rfBandwidth)
|
||||
|| force)
|
||||
{
|
||||
|
||||
//Bandpass filter shaping
|
||||
Real fltLowCut = -((float) settings.m_rfBandwidth / 2.0) / (float) m_sampleRate;
|
||||
Real fltHiCut = ((float) settings.m_rfBandwidth / 2.0) / (float) m_sampleRate;
|
||||
m_objRFFilter->create_filter(fltLowCut, fltHiCut);
|
||||
}
|
||||
|
||||
if ((m_settings.m_centerFrequency != settings.m_centerFrequency)
|
||||
|| force)
|
||||
{
|
||||
m_objNCO.setFreq(-(float) settings.m_centerFrequency, (float) m_sampleRate);
|
||||
}
|
||||
|
||||
if (m_settings.isDifferent(settings) || force)
|
||||
{
|
||||
//m_objSettingsMutex.lock();
|
||||
|
||||
if ((m_settings.m_rfBandwidth != settings.m_rfBandwidth)
|
||||
|| force)
|
||||
{
|
||||
|
||||
//Bandpass filter shaping
|
||||
Real fltLowCut = -((float) settings.m_rfBandwidth / 2.0) / (float) m_sampleRate;
|
||||
Real fltHiCut = ((float) settings.m_rfBandwidth / 2.0) / (float) m_sampleRate;
|
||||
m_objRFFilter->create_filter(fltLowCut, fltHiCut);
|
||||
}
|
||||
|
||||
if ((m_settings.m_centerFrequency != settings.m_centerFrequency)
|
||||
|| force)
|
||||
{
|
||||
m_objNCO.setFreq(-(float) settings.m_centerFrequency, (float) m_sampleRate);
|
||||
}
|
||||
|
||||
//m_objSettingsMutex.unlock();
|
||||
m_blnNeedConfigUpdate = true;
|
||||
}
|
||||
|
||||
|
@ -182,8 +182,6 @@ void DATVDemodSettings::debug(const QString& msg) const
|
||||
bool DATVDemodSettings::isDifferent(const DATVDemodSettings& other)
|
||||
{
|
||||
return ((m_allowDrift != other.m_allowDrift)
|
||||
|| (m_rfBandwidth != other.m_rfBandwidth)
|
||||
|| (m_centerFrequency != other.m_centerFrequency)
|
||||
|| (m_fastLock != other.m_fastLock)
|
||||
|| (m_hardMetric != other.m_hardMetric)
|
||||
|| (m_filter != other.m_filter)
|
||||
|
@ -100,7 +100,7 @@ struct DATVDemodSettings
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
void debug(const QString& msg) const;
|
||||
bool isDifferent(const DATVDemodSettings& other);
|
||||
bool isDifferent(const DATVDemodSettings& other); // true if a change of settings should trigger DVB framework config update
|
||||
void validateSystemConfiguration();
|
||||
|
||||
static DATVModulation getModulationFromStr(const QString& str);
|
||||
|
Loading…
Reference in New Issue
Block a user