diff --git a/plugins/samplesource/limesdrinput/limesdrinput.cpp b/plugins/samplesource/limesdrinput/limesdrinput.cpp index 6620dc3d5..78db9bce6 100644 --- a/plugins/samplesource/limesdrinput/limesdrinput.cpp +++ b/plugins/samplesource/limesdrinput/limesdrinput.cpp @@ -42,8 +42,7 @@ LimeSDRInput::LimeSDRInput(DeviceSourceAPI *deviceAPI) : m_settings(), m_limeSDRInputThread(0), m_deviceDescription("LimeSDRInput"), - m_running(false), - m_firstConfig(true) + m_running(false) { m_streamId.handle = 0; suspendRxBuddies(); @@ -421,14 +420,10 @@ bool LimeSDRInput::handleMessage(const Message& message) MsgConfigureLimeSDR& conf = (MsgConfigureLimeSDR&) message; qDebug() << "LimeSDRInput::handleMessage: MsgConfigureLimeSDR"; - if (!applySettings(conf.getSettings(), m_firstConfig)) + if (!applySettings(conf.getSettings(), conf.getForce())) { qDebug("LimeSDRInput::handleMessage config error"); } - else - { - m_firstConfig = false; - } return true; } diff --git a/plugins/samplesource/limesdrinput/limesdrinput.h b/plugins/samplesource/limesdrinput/limesdrinput.h index 1411b1ada..d4764be01 100644 --- a/plugins/samplesource/limesdrinput/limesdrinput.h +++ b/plugins/samplesource/limesdrinput/limesdrinput.h @@ -37,18 +37,21 @@ public: public: const LimeSDRInputSettings& getSettings() const { return m_settings; } + bool getForce() const { return m_force; } - static MsgConfigureLimeSDR* create(const LimeSDRInputSettings& settings) + static MsgConfigureLimeSDR* create(const LimeSDRInputSettings& settings, bool force) { - return new MsgConfigureLimeSDR(settings); + return new MsgConfigureLimeSDR(settings, force); } private: LimeSDRInputSettings m_settings; + bool m_force; - MsgConfigureLimeSDR(const LimeSDRInputSettings& settings) : + MsgConfigureLimeSDR(const LimeSDRInputSettings& settings, bool force) : Message(), - m_settings(settings) + m_settings(settings), + m_force(force) { } }; @@ -235,7 +238,6 @@ private: QString m_deviceDescription; bool m_running; DeviceLimeSDRShared m_deviceShared; - bool m_firstConfig; lms_stream_t m_streamId; FileRecord *m_fileSink; //!< File sink to record device I/Q output diff --git a/plugins/samplesource/limesdrinput/limesdrinputgui.cpp b/plugins/samplesource/limesdrinput/limesdrinputgui.cpp index bc9f64a22..c72b3c825 100644 --- a/plugins/samplesource/limesdrinput/limesdrinputgui.cpp +++ b/plugins/samplesource/limesdrinput/limesdrinputgui.cpp @@ -36,6 +36,7 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceSourceAPI *deviceAPI, QWidget* parent) : m_sampleRate(0), m_lastEngineState((DSPDeviceSourceEngine::State)-1), m_doApplySettings(true), + m_forceSettings(true), m_statusCounter(0), m_deviceStatusCounter(0) { @@ -125,6 +126,7 @@ bool LimeSDRInputGUI::deserialize(const QByteArray& data) if (m_settings.deserialize(data)) { displaySettings(); + m_forceSettings = true; sendSettings(); return true; } @@ -324,8 +326,9 @@ void LimeSDRInputGUI::updateHardware() if (m_doApplySettings) { qDebug() << "LimeSDRInputGUI::updateHardware"; - LimeSDRInput::MsgConfigureLimeSDR* message = LimeSDRInput::MsgConfigureLimeSDR::create(m_settings); + LimeSDRInput::MsgConfigureLimeSDR* message = LimeSDRInput::MsgConfigureLimeSDR::create(m_settings, m_forceSettings); m_limeSDRInput->getInputMessageQueue()->push(message); + m_forceSettings = false; m_updateTimer.stop(); } } diff --git a/plugins/samplesource/limesdrinput/limesdrinputgui.h b/plugins/samplesource/limesdrinput/limesdrinputgui.h index 7484f03db..c0b87ba1a 100644 --- a/plugins/samplesource/limesdrinput/limesdrinputgui.h +++ b/plugins/samplesource/limesdrinput/limesdrinputgui.h @@ -62,6 +62,7 @@ private: quint64 m_deviceCenterFrequency; //!< Center frequency in device int m_lastEngineState; bool m_doApplySettings; + bool m_forceSettings; int m_statusCounter; int m_deviceStatusCounter; MessageQueue m_inputMessageQueue; diff --git a/plugins/samplesource/limesdrinput/limesdrinputplugin.cpp b/plugins/samplesource/limesdrinput/limesdrinputplugin.cpp index f3dd6ef78..77d74aff0 100644 --- a/plugins/samplesource/limesdrinput/limesdrinputplugin.cpp +++ b/plugins/samplesource/limesdrinput/limesdrinputplugin.cpp @@ -31,7 +31,7 @@ const PluginDescriptor LimeSDRInputPlugin::m_pluginDescriptor = { QString("LimeSDR Input"), - QString("3.5.4"), + QString("3.7.4"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true,