From 075ea2efada3e5dba4d4f4a7de3b571a35cf07ae Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 29 Jul 2015 00:08:27 +0200 Subject: [PATCH] Fixed BladeRF wrong RF bandwidth setting at startup --- plugins/samplesource/bladerf/bladerfinput.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/samplesource/bladerf/bladerfinput.cpp b/plugins/samplesource/bladerf/bladerfinput.cpp index b2bcc824d..14f298cf1 100644 --- a/plugins/samplesource/bladerf/bladerfinput.cpp +++ b/plugins/samplesource/bladerf/bladerfinput.cpp @@ -318,13 +318,13 @@ bool BladerfInput::applySettings(const GeneralSettings& generalSettings, const S } if((m_settings.m_bandwidth != settings.m_bandwidth) || force) { + m_settings.m_bandwidth = settings.m_bandwidth; if(m_dev != NULL) { unsigned int actualBandwidth; - if( bladerf_set_bandwidth(m_dev, BLADERF_MODULE_RX, settings.m_bandwidth, &actualBandwidth) < 0) - qCritical("could not set sample rate: %d", settings.m_samplerate); + if( bladerf_set_bandwidth(m_dev, BLADERF_MODULE_RX, m_settings.m_bandwidth, &actualBandwidth) < 0) + qCritical("could not set sample rate: %d", m_settings.m_samplerate); else { std::cerr << "bladerf_set_bandwidth(BLADERF_MODULE_RX) actual bandwidth is " << actualBandwidth << std::endl; - m_settings.m_bandwidth = settings.m_bandwidth; } } }