1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 14:04:46 -04:00

SDRPlay plugin: added option to handle global tuner gain or individual lna, mixer and baseband gains

This commit is contained in:
f4exb
2016-11-18 02:46:35 +01:00
parent d25e7b613e
commit edd6ab751b
7 changed files with 199 additions and 87 deletions
@@ -37,6 +37,10 @@ void SDRPlaySettings::resetToDefaults()
m_fcPos = FC_POS_CENTER;
m_dcBlock = false;
m_iqCorrection = false;
m_tunerGainMode = true;
m_lnaOn = false;
m_mixerAmpOn = false;
m_basebandGain = 29;
}
QByteArray SDRPlaySettings::serialize() const
@@ -53,6 +57,10 @@ QByteArray SDRPlaySettings::serialize() const
s.writeS32(8, (int) m_fcPos);
s.writeBool(9, m_dcBlock);
s.writeBool(10, m_iqCorrection);
s.writeBool(11, m_tunerGainMode);
s.writeBool(12, m_lnaOn);
s.writeBool(13, m_mixerAmpOn);
s.writeS32(14, m_basebandGain);
return s.final();
}
@@ -82,6 +90,10 @@ bool SDRPlaySettings::deserialize(const QByteArray& data)
m_fcPos = (fcPos_t) intval;
d.readBool(9, &m_dcBlock, false);
d.readBool(10, &m_iqCorrection, false);
d.readBool(11, &m_tunerGainMode, true);
d.readBool(12, &m_lnaOn, false);
d.readBool(13, &m_mixerAmpOn, false);
d.readS32(14, &m_basebandGain, 29);
return true;
}