1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-04 16:01:14 -05:00

DSD demodulator: use channel marker serializer/deserializer

This commit is contained in:
f4exb 2017-08-26 14:36:38 +02:00
parent 7af90583fe
commit 70de05f060
2 changed files with 5 additions and 13 deletions

View File

@ -186,7 +186,6 @@ bool BFMDemodGUI::deserialize(const QByteArray& data)
ui->lsbStereo->setChecked(booltmp); ui->lsbStereo->setChecked(booltmp);
this->setWindowTitle(m_channelMarker.getTitle()); this->setWindowTitle(m_channelMarker.getTitle());
displayUDPAddress(); displayUDPAddress();
blockApplySettings(false); blockApplySettings(false);

View File

@ -110,10 +110,7 @@ QByteArray DSDDemodGUI::serialize() const
s.writeBool(14, m_slot1On); s.writeBool(14, m_slot1On);
s.writeBool(15, m_slot2On); s.writeBool(15, m_slot2On);
s.writeBool(16, m_tdmaStereo); s.writeBool(16, m_tdmaStereo);
s.writeString(17, m_channelMarker.getTitle()); s.writeBlob(17, m_channelMarker.serialize());
s.writeString(18, m_channelMarker.getUDPAddress());
s.writeU32(19, (quint32) m_channelMarker.getUDPReceivePort());
s.writeU32(20, (quint32) m_channelMarker.getUDPSendPort());
return s.final(); return s.final();
} }
@ -137,6 +134,9 @@ bool DSDDemodGUI::deserialize(const QByteArray& data)
blockApplySettings(true); blockApplySettings(true);
m_channelMarker.blockSignals(true); m_channelMarker.blockSignals(true);
d.readBlob(17, &bytetmp);
m_channelMarker.deserialize(bytetmp);
d.readS32(1, &tmp, 0); d.readS32(1, &tmp, 0);
m_channelMarker.setCenterFrequency(tmp); m_channelMarker.setCenterFrequency(tmp);
d.readS32(2, &tmp, 4); d.readS32(2, &tmp, 4);
@ -166,15 +166,8 @@ bool DSDDemodGUI::deserialize(const QByteArray& data)
d.readBool(14, &m_slot1On, false); d.readBool(14, &m_slot1On, false);
d.readBool(15, &m_slot2On, false); d.readBool(15, &m_slot2On, false);
d.readBool(16, &m_tdmaStereo, false); d.readBool(16, &m_tdmaStereo, false);
d.readString(17, &strtmp, "DSD Demodulator");
m_channelMarker.setTitle(strtmp);
this->setWindowTitle(m_channelMarker.getTitle()); this->setWindowTitle(m_channelMarker.getTitle());
d.readString(18, &strtmp, "127.0.0.1");
m_channelMarker.setUDPAddress(strtmp);
d.readU32(19, &u32tmp, 9999);
m_channelMarker.setUDPReceivePort(u32tmp);
d.readU32(20, &u32tmp, 9999);
m_channelMarker.setUDPSendPort(u32tmp);
displayUDPAddress(); displayUDPAddress();
blockApplySettings(false); blockApplySettings(false);