1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-15 12:51:49 -05:00

DSD demod: save PLL enable and audio mute indicators in preset

This commit is contained in:
f4exb 2019-04-24 17:50:31 +02:00
parent ea9df8700b
commit 4cc81d55da

View File

@ -68,6 +68,7 @@ QByteArray DSDDemodSettings::serialize() const
s.writeS32(3, m_demodGain*100.0); s.writeS32(3, m_demodGain*100.0);
s.writeS32(4, m_fmDeviation/100.0); s.writeS32(4, m_fmDeviation/100.0);
s.writeS32(5, m_squelch); s.writeS32(5, m_squelch);
s.writeBool(6, m_pllLock);
s.writeU32(7, m_rgbColor); s.writeU32(7, m_rgbColor);
s.writeS32(8, m_squelchGate); s.writeS32(8, m_squelchGate);
s.writeS32(9, m_volume*10.0); s.writeS32(9, m_volume*10.0);
@ -98,6 +99,7 @@ QByteArray DSDDemodSettings::serialize() const
s.writeU32(26, m_reverseAPIPort); s.writeU32(26, m_reverseAPIPort);
s.writeU32(27, m_reverseAPIDeviceIndex); s.writeU32(27, m_reverseAPIDeviceIndex);
s.writeU32(28, m_reverseAPIChannelIndex); s.writeU32(28, m_reverseAPIChannelIndex);
s.writeBool(29, m_audioMute);
return s.final(); return s.final();
} }
@ -134,6 +136,7 @@ bool DSDDemodSettings::deserialize(const QByteArray& data)
m_fmDeviation = tmp * 100.0; m_fmDeviation = tmp * 100.0;
d.readS32(5, &tmp, -40); d.readS32(5, &tmp, -40);
m_squelch = tmp < -100 ? tmp / 10.0 : tmp; m_squelch = tmp < -100 ? tmp / 10.0 : tmp;
d.readBool(6, &m_pllLock, true);
d.readU32(7, &m_rgbColor); d.readU32(7, &m_rgbColor);
d.readS32(8, &m_squelchGate, 5); d.readS32(8, &m_squelchGate, 5);
d.readS32(9, &tmp, 20); d.readS32(9, &tmp, 20);
@ -173,6 +176,7 @@ bool DSDDemodSettings::deserialize(const QByteArray& data)
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp; m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
d.readU32(28, &utmp, 0); d.readU32(28, &utmp, 0);
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp; m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
d.readBool(29, &m_audioMute, false);
return true; return true;
} }