1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-07 16:34:45 -04:00

SDRPlay plugin: interface replaced by libmirisdr: refactor interim state (1)

This commit is contained in:
f4exb
2016-11-15 18:58:17 +01:00
parent a9f7c67f7b
commit e4f3915282
7 changed files with 389 additions and 684 deletions
@@ -27,11 +27,10 @@ SDRPlaySettings::SDRPlaySettings()
void SDRPlaySettings::resetToDefaults()
{
m_centerFrequency = 7040*1000;
m_LOppmTenths = 0;
m_gain = 0;
m_LOppmCorrection = 0;
m_frequencyBandIndex = 0;
m_ifFrequencyIndex = 0;
m_mirDcCorrIndex = 0;
m_mirDcCorrTrackTimeIndex = 1;
m_bandwidthIndex = 0;
m_devSampleRateIndex = 0;
m_gainRedctionIndex = 35;
@@ -45,18 +44,17 @@ QByteArray SDRPlaySettings::serialize() const
{
SimpleSerializer s(1);
s.writeS32(1, m_LOppmTenths);
s.writeS32(1, m_LOppmCorrection);
s.writeU32(2, m_frequencyBandIndex);
s.writeU32(3, m_ifFrequencyIndex);
s.writeU32(4, m_mirDcCorrIndex);
s.writeU32(5, m_mirDcCorrTrackTimeIndex);
s.writeU32(6, m_bandwidthIndex);
s.writeU32(7, m_devSampleRateIndex);
s.writeU32(8, m_gainRedctionIndex);
s.writeU32(9, m_log2Decim);
s.writeS32(10, (int) m_fcPos);
s.writeBool(11, m_dcBlock);
s.writeBool(12, m_iqCorrection);
s.writeS32(4, m_gain);
s.writeU32(5, m_bandwidthIndex);
s.writeU32(6, m_devSampleRateIndex);
s.writeU32(7, m_gainRedctionIndex);
s.writeU32(8, m_log2Decim);
s.writeS32(9, (int) m_fcPos);
s.writeBool(10, m_dcBlock);
s.writeBool(11, m_iqCorrection);
return s.final();
}
@@ -75,19 +73,18 @@ bool SDRPlaySettings::deserialize(const QByteArray& data)
{
int intval;
d.readS32(1, &m_LOppmTenths, 0);
d.readS32(1, &m_LOppmCorrection, 0);
d.readU32(2, &m_frequencyBandIndex, 0);
d.readU32(3, &m_ifFrequencyIndex, 0);
d.readU32(4, &m_mirDcCorrIndex, 0);
d.readU32(5, &m_mirDcCorrTrackTimeIndex, 1);
d.readU32(6, &m_bandwidthIndex, 0);
d.readU32(7, &m_devSampleRateIndex, 0);
d.readU32(8, &m_gainRedctionIndex, 35);
d.readU32(9, &m_log2Decim, 0);
d.readS32(10, &intval, 0);
d.readS32(4, &m_gain, 0);
d.readU32(5, &m_bandwidthIndex, 0);
d.readU32(6, &m_devSampleRateIndex, 0);
d.readU32(7, &m_gainRedctionIndex, 35);
d.readU32(8, &m_log2Decim, 0);
d.readS32(9, &intval, 0);
m_fcPos = (fcPos_t) intval;
d.readBool(11, &m_dcBlock, false);
d.readBool(12, &m_iqCorrection, false);
d.readBool(10, &m_dcBlock, false);
d.readBool(11, &m_iqCorrection, false);
return true;
}