From 69cd5645ebf3b31d5b69a513c7b0fbf759ec3745 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 15 Nov 2018 14:11:52 +0100 Subject: [PATCH] SoapySDR support: fixed input and output stream and device displays --- .../samplesink/soapysdroutput/soapysdroutputgui.cpp | 11 +++++++---- .../samplesource/soapysdrinput/soapysdrinputgui.cpp | 12 +++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp b/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp index 3d997a8f3..aab300296 100644 --- a/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp +++ b/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp @@ -438,12 +438,15 @@ QByteArray SoapySDROutputGui::serialize() const bool SoapySDROutputGui::deserialize(const QByteArray& data) { - if(m_settings.deserialize(data)) { + if(m_settings.deserialize(data)) + { displaySettings(); m_forceSettings = true; sendSettings(); return true; - } else { + } + else + { resetToDefaults(); return false; } @@ -769,7 +772,7 @@ void SoapySDROutputGui::displayStreamArgsSettings() if (elIt != m_settings.m_streamArgSettings.end()) { - it->setValue(*elIt); + it->setValue(elIt.value()); *elIt = it->getValue(); } } @@ -783,7 +786,7 @@ void SoapySDROutputGui::displayDeviceArgsSettings() if (elIt != m_settings.m_deviceArgSettings.end()) { - it->setValue(*elIt); + it->setValue(elIt.value()); *elIt = it->getValue(); } } diff --git a/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp b/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp index b8382d0c1..5f9ca4f2a 100644 --- a/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp +++ b/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp @@ -441,12 +441,15 @@ QByteArray SoapySDRInputGui::serialize() const bool SoapySDRInputGui::deserialize(const QByteArray& data) { - if(m_settings.deserialize(data)) { + if (m_settings.deserialize(data)) + { displaySettings(); m_forceSettings = true; sendSettings(); return true; - } else { + } + else + { resetToDefaults(); return false; } @@ -716,7 +719,6 @@ void SoapySDRInputGui::displaySettings() ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000); if (m_antennas) { - qDebug("SoapySDRInputGui::displaySettings: m_antenna: %s", m_settings.m_antenna.toStdString().c_str()); m_antennas->setValue(m_settings.m_antenna.toStdString()); } if (m_sampleRateGUI) @@ -815,7 +817,7 @@ void SoapySDRInputGui::displayStreamArgsSettings() if (elIt != m_settings.m_streamArgSettings.end()) { - it->setValue(*elIt); + it->setValue(elIt.value()); *elIt = it->getValue(); } } @@ -829,7 +831,7 @@ void SoapySDRInputGui::displayDeviceArgsSettings() if (elIt != m_settings.m_deviceArgSettings.end()) { - it->setValue(*elIt); + it->setValue(elIt.value()); *elIt = it->getValue(); } }