1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 06:04:39 -04:00

RTLSDR: implemented offset tuning

This commit is contained in:
f4exb
2018-11-26 08:54:06 +01:00
parent bc7ad10f9d
commit 772a150136
6 changed files with 38 additions and 5 deletions
+16 -5
View File
@@ -507,17 +507,28 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force)
if (m_dev != 0)
{
if (rtlsdr_set_tuner_bandwidth( m_dev, m_settings.m_rfBandwidth) != 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
{
} else {
qDebug() << "RTLSDRInput::applySettings: set RF bandwidth to " << m_settings.m_rfBandwidth;
}
}
}
if ((m_settings.m_offsetTuning != settings.m_offsetTuning) || force)
{
m_settings.m_offsetTuning = settings.m_offsetTuning;
if (m_dev != 0)
{
if (rtlsdr_set_offset_tuning(m_dev, m_settings.m_offsetTuning ? 0 : 1) != 0) {
qCritical("RTLSDRInput::applySettings: could not set offset tuning to %s", m_settings.m_offsetTuning ? "on" : "off");
} else {
qDebug("RTLSDRInput::applySettings: offset tuning set to %s", m_settings.m_offsetTuning ? "on" : "off");
}
}
}
if (forwardChange)
{
int sampleRate = m_settings.m_devSampleRate/(1<<m_settings.m_log2Decim);