1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

RTL-SDR: implemented tuner bandwidth control

This commit is contained in:
f4exb
2018-01-16 01:01:24 +01:00
parent bb799a9785
commit 6800bc769e
8 changed files with 79 additions and 4 deletions
@@ -515,6 +515,23 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force)
}
}
if ((m_settings.m_rfBandwidth != settings.m_rfBandwidth) || force)
{
m_settings.m_rfBandwidth = settings.m_rfBandwidth;
if (m_dev != 0)
{
if (rtlsdr_set_tuner_bandwidth( m_dev, m_settings.m_rfBandwidth) != 0)
{
qCritical("RTLSDRInput::applySettings: could not set RF bandwidth to %u", m_settings.m_rfBandwidth);
}
else
{
qDebug() << "RTLSDRInput::applySettings: set RF bandwidth to " << m_settings.m_rfBandwidth;
}
}
}
if (forwardChange)
{
int sampleRate = m_settings.m_devSampleRate/(1<<m_settings.m_log2Decim);