1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 19:28:47 -05:00

SoapySDR support: fixed input and output stream and device displays

This commit is contained in:
f4exb 2018-11-15 14:11:52 +01:00
parent 53c0474e00
commit 69cd5645eb
2 changed files with 14 additions and 9 deletions

View File

@ -438,12 +438,15 @@ QByteArray SoapySDROutputGui::serialize() const
bool SoapySDROutputGui::deserialize(const QByteArray& data) bool SoapySDROutputGui::deserialize(const QByteArray& data)
{ {
if(m_settings.deserialize(data)) { if(m_settings.deserialize(data))
{
displaySettings(); displaySettings();
m_forceSettings = true; m_forceSettings = true;
sendSettings(); sendSettings();
return true; return true;
} else { }
else
{
resetToDefaults(); resetToDefaults();
return false; return false;
} }
@ -769,7 +772,7 @@ void SoapySDROutputGui::displayStreamArgsSettings()
if (elIt != m_settings.m_streamArgSettings.end()) if (elIt != m_settings.m_streamArgSettings.end())
{ {
it->setValue(*elIt); it->setValue(elIt.value());
*elIt = it->getValue(); *elIt = it->getValue();
} }
} }
@ -783,7 +786,7 @@ void SoapySDROutputGui::displayDeviceArgsSettings()
if (elIt != m_settings.m_deviceArgSettings.end()) if (elIt != m_settings.m_deviceArgSettings.end())
{ {
it->setValue(*elIt); it->setValue(elIt.value());
*elIt = it->getValue(); *elIt = it->getValue();
} }
} }

View File

@ -441,12 +441,15 @@ QByteArray SoapySDRInputGui::serialize() const
bool SoapySDRInputGui::deserialize(const QByteArray& data) bool SoapySDRInputGui::deserialize(const QByteArray& data)
{ {
if(m_settings.deserialize(data)) { if (m_settings.deserialize(data))
{
displaySettings(); displaySettings();
m_forceSettings = true; m_forceSettings = true;
sendSettings(); sendSettings();
return true; return true;
} else { }
else
{
resetToDefaults(); resetToDefaults();
return false; return false;
} }
@ -716,7 +719,6 @@ void SoapySDRInputGui::displaySettings()
ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000); ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000);
if (m_antennas) { if (m_antennas) {
qDebug("SoapySDRInputGui::displaySettings: m_antenna: %s", m_settings.m_antenna.toStdString().c_str());
m_antennas->setValue(m_settings.m_antenna.toStdString()); m_antennas->setValue(m_settings.m_antenna.toStdString());
} }
if (m_sampleRateGUI) if (m_sampleRateGUI)
@ -815,7 +817,7 @@ void SoapySDRInputGui::displayStreamArgsSettings()
if (elIt != m_settings.m_streamArgSettings.end()) if (elIt != m_settings.m_streamArgSettings.end())
{ {
it->setValue(*elIt); it->setValue(elIt.value());
*elIt = it->getValue(); *elIt = it->getValue();
} }
} }
@ -829,7 +831,7 @@ void SoapySDRInputGui::displayDeviceArgsSettings()
if (elIt != m_settings.m_deviceArgSettings.end()) if (elIt != m_settings.m_deviceArgSettings.end())
{ {
it->setValue(*elIt); it->setValue(elIt.value());
*elIt = it->getValue(); *elIt = it->getValue();
} }
} }