1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

UDP source: use channel marker serializer/deserializer (1)

This commit is contained in:
f4exb 2017-08-26 21:03:37 +02:00
parent 7ae5c2a6d6
commit 1ff798f1d6

View File

@ -96,7 +96,7 @@ QByteArray UDPSrcGUI::serialize() const
s.writeS32(3, m_sampleFormat); s.writeS32(3, m_sampleFormat);
s.writeReal(4, m_outputSampleRate); s.writeReal(4, m_outputSampleRate);
s.writeReal(5, m_rfBandwidth); s.writeReal(5, m_rfBandwidth);
s.writeS32(6, m_channelMarker.getUDPSendPort()); s.writeBlob(6, m_channelMarker.serialize());
s.writeBlob(7, ui->spectrumGUI->serialize()); s.writeBlob(7, ui->spectrumGUI->serialize());
s.writeS32(8, ui->gain->value()); s.writeS32(8, ui->gain->value());
s.writeString(10, m_channelMarker.getUDPAddress()); s.writeString(10, m_channelMarker.getUDPAddress());
@ -134,6 +134,9 @@ bool UDPSrcGUI::deserialize(const QByteArray& data)
d.readBlob(1, &bytetmp); d.readBlob(1, &bytetmp);
restoreState(bytetmp); restoreState(bytetmp);
d.readBlob(6, &bytetmp);
m_channelMarker.deserialize(bytetmp);
d.readS32(2, &s32tmp, 0); d.readS32(2, &s32tmp, 0);
m_channelMarker.setCenterFrequency(s32tmp); m_channelMarker.setCenterFrequency(s32tmp);
d.readS32(3, &s32tmp, UDPSrc::FormatS16LE); d.readS32(3, &s32tmp, UDPSrc::FormatS16LE);
@ -216,6 +219,7 @@ bool UDPSrcGUI::deserialize(const QByteArray& data)
blockApplySettings(false); blockApplySettings(false);
m_channelMarker.blockSignals(false); m_channelMarker.blockSignals(false);
displaySettings();
applySettingsImmediate(true); applySettingsImmediate(true);
applySettings(true); applySettings(true);
return true; return true;