diff --git a/plugins/samplesink/bladerfoutput/bladerfoutput.cpp b/plugins/samplesink/bladerfoutput/bladerfoutput.cpp index 6d0258823..4b51497df 100644 --- a/plugins/samplesink/bladerfoutput/bladerfoutput.cpp +++ b/plugins/samplesink/bladerfoutput/bladerfoutput.cpp @@ -207,7 +207,7 @@ bool BladerfOutput::handleMessage(const Message& message) MsgConfigureBladerf& conf = (MsgConfigureBladerf&) message; qDebug() << "BladerfInput::handleMessage: MsgConfigureBladerf"; - if (!applySettings(conf.getSettings(), false)) + if (!applySettings(conf.getSettings(), conf.getForce())) { qDebug("BladeRF config error"); } diff --git a/plugins/samplesink/bladerfoutput/bladerfoutput.h b/plugins/samplesink/bladerfoutput/bladerfoutput.h index 958fea840..215973a60 100644 --- a/plugins/samplesink/bladerfoutput/bladerfoutput.h +++ b/plugins/samplesink/bladerfoutput/bladerfoutput.h @@ -36,18 +36,21 @@ public: public: const BladeRFOutputSettings& getSettings() const { return m_settings; } + bool getForce() const { return m_force; } - static MsgConfigureBladerf* create(const BladeRFOutputSettings& settings) + static MsgConfigureBladerf* create(const BladeRFOutputSettings& settings, bool force) { - return new MsgConfigureBladerf(settings); + return new MsgConfigureBladerf(settings, force); } private: BladeRFOutputSettings m_settings; + bool m_force; - MsgConfigureBladerf(const BladeRFOutputSettings& settings) : + MsgConfigureBladerf(const BladeRFOutputSettings& settings, bool force) : Message(), - m_settings(settings) + m_settings(settings), + m_force(force) { } }; diff --git a/plugins/samplesink/bladerfoutput/bladerfoutputgui.cpp b/plugins/samplesink/bladerfoutput/bladerfoutputgui.cpp index d1f70f417..052996218 100644 --- a/plugins/samplesink/bladerfoutput/bladerfoutputgui.cpp +++ b/plugins/samplesink/bladerfoutput/bladerfoutputgui.cpp @@ -32,6 +32,7 @@ BladerfOutputGui::BladerfOutputGui(DeviceSinkAPI *deviceAPI, QWidget* parent) : QWidget(parent), ui(new Ui::BladerfOutputGui), m_deviceAPI(deviceAPI), + m_forceSettings(true), m_settings(), m_deviceSampleSink(NULL), m_sampleRate(0), @@ -113,6 +114,7 @@ bool BladerfOutputGui::deserialize(const QByteArray& data) { if(m_settings.deserialize(data)) { displaySettings(); + m_forceSettings = true; sendSettings(); return true; } else { @@ -321,8 +323,9 @@ void BladerfOutputGui::on_startStop_toggled(bool checked) void BladerfOutputGui::updateHardware() { qDebug() << "BladerfGui::updateHardware"; - BladerfOutput::MsgConfigureBladerf* message = BladerfOutput::MsgConfigureBladerf::create( m_settings); + BladerfOutput::MsgConfigureBladerf* message = BladerfOutput::MsgConfigureBladerf::create( m_settings, m_forceSettings); m_deviceSampleSink->getInputMessageQueue()->push(message); + m_forceSettings = false; m_updateTimer.stop(); } diff --git a/plugins/samplesink/bladerfoutput/bladerfoutputgui.h b/plugins/samplesink/bladerfoutput/bladerfoutputgui.h index e275d3b30..b31157802 100644 --- a/plugins/samplesink/bladerfoutput/bladerfoutputgui.h +++ b/plugins/samplesink/bladerfoutput/bladerfoutputgui.h @@ -55,6 +55,7 @@ private: Ui::BladerfOutputGui* ui; DeviceSinkAPI* m_deviceAPI; + bool m_forceSettings; BladeRFOutputSettings m_settings; QTimer m_updateTimer; QTimer m_statusTimer; diff --git a/plugins/samplesink/bladerfoutput/bladerfoutputplugin.cpp b/plugins/samplesink/bladerfoutput/bladerfoutputplugin.cpp index 6ea15cc63..5b870d6c6 100644 --- a/plugins/samplesink/bladerfoutput/bladerfoutputplugin.cpp +++ b/plugins/samplesink/bladerfoutput/bladerfoutputplugin.cpp @@ -26,7 +26,7 @@ const PluginDescriptor BladerfOutputPlugin::m_pluginDescriptor = { QString("BladerRF Output"), - QString("3.5.5"), + QString("3.7.4"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true,