1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-05-29 05:22:25 -04:00

Packet demod updates

Use unique window colour.
Save/restore bandwidth and deviation settings.
Update channel URI to be consistent with others.
This commit is contained in:
Jon Beniston 2021-02-26 20:35:04 +00:00
parent ced903638c
commit bc3419cb66
2 changed files with 9 additions and 3 deletions

View File

@ -42,7 +42,7 @@
MESSAGE_CLASS_DEFINITION(PacketDemod::MsgConfigurePacketDemod, Message) MESSAGE_CLASS_DEFINITION(PacketDemod::MsgConfigurePacketDemod, Message)
const char * const PacketDemod::m_channelIdURI = "sdrangel.channelrx.packetdemod"; const char * const PacketDemod::m_channelIdURI = "sdrangel.channel.packetdemod";
const char * const PacketDemod::m_channelId = "PacketDemod"; const char * const PacketDemod::m_channelId = "PacketDemod";
PacketDemod::PacketDemod(DeviceAPI *deviceAPI) : PacketDemod::PacketDemod(DeviceAPI *deviceAPI) :

View File

@ -39,7 +39,7 @@ void PacketDemodSettings::resetToDefaults()
m_filterTo = ""; m_filterTo = "";
m_filterPID = ""; m_filterPID = "";
m_rgbColor = QColor(255, 255, 0).rgb(); m_rgbColor = QColor(0, 105, 2).rgb();
m_title = "Packet Demodulator"; m_title = "Packet Demodulator";
m_streamIndex = 0; m_streamIndex = 0;
m_useReverseAPI = false; m_useReverseAPI = false;
@ -76,6 +76,9 @@ QByteArray PacketDemodSettings::serialize() const
s.writeU32(17, m_reverseAPIDeviceIndex); s.writeU32(17, m_reverseAPIDeviceIndex);
s.writeU32(18, m_reverseAPIChannelIndex); s.writeU32(18, m_reverseAPIChannelIndex);
s.writeFloat(20, m_rfBandwidth);
s.writeFloat(21, m_fmDeviation);
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++) for (int i = 0; i < PACKETDEMOD_COLUMNS; i++)
s.writeS32(100 + i, m_columnIndexes[i]); s.writeS32(100 + i, m_columnIndexes[i]);
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++) for (int i = 0; i < PACKETDEMOD_COLUMNS; i++)
@ -111,7 +114,7 @@ bool PacketDemodSettings::deserialize(const QByteArray& data)
m_channelMarker->deserialize(bytetmp); m_channelMarker->deserialize(bytetmp);
} }
d.readU32(7, &m_rgbColor); d.readU32(7, &m_rgbColor, QColor(0, 105, 2).rgb());
d.readString(9, &m_title, "Packet Demodulator"); d.readString(9, &m_title, "Packet Demodulator");
d.readBool(14, &m_useReverseAPI, false); d.readBool(14, &m_useReverseAPI, false);
d.readString(15, &m_reverseAPIAddress, "127.0.0.1"); d.readString(15, &m_reverseAPIAddress, "127.0.0.1");
@ -128,6 +131,9 @@ bool PacketDemodSettings::deserialize(const QByteArray& data)
d.readU32(18, &utmp, 0); d.readU32(18, &utmp, 0);
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp; m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
d.readFloat(20, &m_rfBandwidth, 12500.0f);
d.readFloat(21, &m_fmDeviation, 2500.0f);
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++) for (int i = 0; i < PACKETDEMOD_COLUMNS; i++)
d.readS32(100 + i, &m_columnIndexes[i], i); d.readS32(100 + i, &m_columnIndexes[i], i);
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++) for (int i = 0; i < PACKETDEMOD_COLUMNS; i++)