1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

PlutoSDRInput: added rudimentary core class

This commit is contained in:
f4exb
2017-09-04 13:32:31 +02:00
parent fd851592ba
commit 75a6040f40
5 changed files with 172 additions and 4 deletions
@@ -29,13 +29,19 @@ void PlutoSDRInputSettings::resetToDefaults()
{
m_centerFrequency = 435000 * 1000;
m_fcPos = FC_POS_CENTER;
m_LOppmTenths = 0;
m_log2Decim = 0;
m_devSampleRate = 1536 * 1000;
}
QByteArray PlutoSDRInputSettings::serialize() const
{
SimpleSerializer s(1);
s.writeS32(1, m_LOppmTenths);
s.writeU32(4, m_log2Decim);
s.writeS32(5, m_fcPos);
s.writeU64(12, m_devSampleRate);
return s.final();
}
@@ -54,8 +60,11 @@ bool PlutoSDRInputSettings::deserialize(const QByteArray& data)
{
int intval;
d.readS32(1, &m_LOppmTenths, 0);
d.readU32(4, &m_log2Decim, 0);
d.readS32(5, &intval, 0);
m_fcPos = (fcPos_t) intval;
d.readU64(12, &m_devSampleRate, 1536000U);
return true;
}