diff --git a/plugins/samplesource/airspy/airspygui.cpp b/plugins/samplesource/airspy/airspygui.cpp index bb7756dc2..6e4229e9b 100644 --- a/plugins/samplesource/airspy/airspygui.cpp +++ b/plugins/samplesource/airspy/airspygui.cpp @@ -34,6 +34,7 @@ AirspyGui::AirspyGui(DeviceSourceAPI *deviceAPI, QWidget* parent) : QWidget(parent), ui(new Ui::AirspyGui), m_deviceAPI(deviceAPI), + m_forceSettings(true), m_settings(), m_sampleSource(0), m_lastEngineState((DSPDeviceSourceEngine::State)-1) @@ -53,6 +54,8 @@ AirspyGui::AirspyGui(DeviceSourceAPI *deviceAPI, QWidget* parent) : m_rates = ((AirspyInput*) m_sampleSource)->getSampleRates(); displaySampleRates(); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); + + sendSettings(); } AirspyGui::~AirspyGui() @@ -103,6 +106,7 @@ bool AirspyGui::deserialize(const QByteArray& data) { if(m_settings.deserialize(data)) { displaySettings(); + m_forceSettings = true; sendSettings(); return true; } else { @@ -375,8 +379,9 @@ void AirspyGui::on_transverter_clicked() void AirspyGui::updateHardware() { qDebug() << "AirspyGui::updateHardware"; - AirspyInput::MsgConfigureAirspy* message = AirspyInput::MsgConfigureAirspy::create( m_settings); + AirspyInput::MsgConfigureAirspy* message = AirspyInput::MsgConfigureAirspy::create(m_settings, m_forceSettings); m_sampleSource->getInputMessageQueue()->push(message); + m_forceSettings = false; m_updateTimer.stop(); } diff --git a/plugins/samplesource/airspy/airspygui.h b/plugins/samplesource/airspy/airspygui.h index c507a6dd7..e2551f21a 100644 --- a/plugins/samplesource/airspy/airspygui.h +++ b/plugins/samplesource/airspy/airspygui.h @@ -58,6 +58,7 @@ private: Ui::AirspyGui* ui; DeviceSourceAPI* m_deviceAPI; + bool m_forceSettings; AirspySettings m_settings; QTimer m_updateTimer; QTimer m_statusTimer; diff --git a/plugins/samplesource/airspy/airspyinput.cpp b/plugins/samplesource/airspy/airspyinput.cpp index 02410cdbd..8fa9943bd 100644 --- a/plugins/samplesource/airspy/airspyinput.cpp +++ b/plugins/samplesource/airspy/airspyinput.cpp @@ -227,7 +227,7 @@ bool AirspyInput::handleMessage(const Message& message) MsgConfigureAirspy& conf = (MsgConfigureAirspy&) message; qDebug() << "AirspyInput::handleMessage: MsgConfigureAirspy"; - bool success = applySettings(conf.getSettings(), false); + bool success = applySettings(conf.getSettings(), conf.getForce()); if (!success) { diff --git a/plugins/samplesource/airspy/airspyinput.h b/plugins/samplesource/airspy/airspyinput.h index 9981367b5..0692bd1f5 100644 --- a/plugins/samplesource/airspy/airspyinput.h +++ b/plugins/samplesource/airspy/airspyinput.h @@ -34,18 +34,21 @@ public: public: const AirspySettings& getSettings() const { return m_settings; } + bool getForce() const { return m_force; } - static MsgConfigureAirspy* create(const AirspySettings& settings) + static MsgConfigureAirspy* create(const AirspySettings& settings, bool force) { - return new MsgConfigureAirspy(settings); + return new MsgConfigureAirspy(settings, force); } private: AirspySettings m_settings; + bool m_force; - MsgConfigureAirspy(const AirspySettings& settings) : + MsgConfigureAirspy(const AirspySettings& settings, bool force) : Message(), - m_settings(settings) + m_settings(settings), + m_force(force) { } }; diff --git a/plugins/samplesource/airspy/airspyplugin.cpp b/plugins/samplesource/airspy/airspyplugin.cpp index 13d856eb2..959c99e89 100644 --- a/plugins/samplesource/airspy/airspyplugin.cpp +++ b/plugins/samplesource/airspy/airspyplugin.cpp @@ -27,7 +27,7 @@ const PluginDescriptor AirspyPlugin::m_pluginDescriptor = { QString("Airspy Input"), - QString("3.7.3"), + QString("3.7.4"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true,