summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2013-10-03 14:38:31 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2013-10-03 14:38:31 +0200
commit4f2d10d59140817e02688bd43b6be8f8d0762169 (patch)
tree130c74c6dff68ca0d604e7c14c4f08b703c4c6bf
parentc0a54d95dfa351eb64ebd5ef966537cadbdd47a3 (diff)
gnuradioinput: fix automatic bandwidth selection on samp rate change
-rw-r--r--plugins/samplesource/gnuradio/gnuradiogui.cpp1
-rw-r--r--plugins/samplesource/gnuradio/gnuradioinput.cpp5
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/samplesource/gnuradio/gnuradiogui.cpp b/plugins/samplesource/gnuradio/gnuradiogui.cpp
index 80e0b25..3291aa4 100644
--- a/plugins/samplesource/gnuradio/gnuradiogui.cpp
+++ b/plugins/samplesource/gnuradio/gnuradiogui.cpp
@@ -391,7 +391,6 @@ void GNURadioGui::on_cboSampleRate_currentIndexChanged(int index)
return;
m_settings.m_sampRate = m_sampRates[index];
-
sendSettings();
}
diff --git a/plugins/samplesource/gnuradio/gnuradioinput.cpp b/plugins/samplesource/gnuradio/gnuradioinput.cpp
index 9fb627c..b564822 100644
--- a/plugins/samplesource/gnuradio/gnuradioinput.cpp
+++ b/plugins/samplesource/gnuradio/gnuradioinput.cpp
@@ -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;
+ /* setting the BW to 0.0 triggers automatic bandwidth
+ * selection when supported by device */
radio->set_bandwidth( m_settings.m_bandwidth );
}