gnuradioinput: fix automatic bandwidth selection on samp rate change

This commit is contained in:
Dimitri Stolnikov 2013-10-03 14:38:31 +02:00
parent c0a54d95df
commit 4f2d10d591
2 changed files with 4 additions and 2 deletions

View File

@ -391,7 +391,6 @@ void GNURadioGui::on_cboSampleRate_currentIndexChanged(int index)
return; return;
m_settings.m_sampRate = m_sampRates[index]; m_settings.m_sampRate = m_sampRates[index];
sendSettings(); sendSettings();
} }

View File

@ -315,8 +315,11 @@ bool GNURadioInput::applySettings(const GeneralSettings& generalSettings,
} }
} }
if((m_settings.m_bandwidth != settings.m_bandwidth) || force) { if((m_settings.m_bandwidth != settings.m_bandwidth) ||
(0.0f == settings.m_bandwidth) || force) {
m_settings.m_bandwidth = settings.m_bandwidth; m_settings.m_bandwidth = settings.m_bandwidth;
/* setting the BW to 0.0 triggers automatic bandwidth
* selection when supported by device */
radio->set_bandwidth( m_settings.m_bandwidth ); radio->set_bandwidth( m_settings.m_bandwidth );
} }