mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
Massive UI revamping (v7): implemented device common settings from top bar and added documentation on device windows top and bottom bars
This commit is contained in:
@@ -32,6 +32,10 @@ void TestMOSyncSettings::resetToDefaults()
|
||||
m_log2Interp = 0;
|
||||
m_fcPosTx = FC_POS_CENTER;
|
||||
m_workspaceIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray TestMOSyncSettings::serialize() const
|
||||
@@ -43,6 +47,10 @@ QByteArray TestMOSyncSettings::serialize() const
|
||||
s.writeS32(3, (int) m_fcPosTx);
|
||||
s.writeS32(4, m_workspaceIndex);
|
||||
s.writeBlob(5, m_geometryBytes);
|
||||
s.writeBool(6, m_useReverseAPI);
|
||||
s.writeString(7, m_reverseAPIAddress);
|
||||
s.writeU32(8, m_reverseAPIPort);
|
||||
s.writeU32(9, m_reverseAPIDeviceIndex);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@@ -60,6 +68,7 @@ bool TestMOSyncSettings::deserialize(const QByteArray& data)
|
||||
if (d.getVersion() == 1)
|
||||
{
|
||||
int intval;
|
||||
uint32_t utmp;
|
||||
|
||||
d.readU64(1, &m_sampleRate, 48000);
|
||||
d.readU32(2, &m_log2Interp, 0);
|
||||
@@ -67,6 +76,18 @@ bool TestMOSyncSettings::deserialize(const QByteArray& data)
|
||||
m_fcPosTx = (fcPos_t) intval;
|
||||
d.readS32(4, &m_workspaceIndex, 0);
|
||||
d.readBlob(5, &m_geometryBytes);
|
||||
d.readBool(1, &m_useReverseAPI, false);
|
||||
d.readString(2, &m_reverseAPIAddress, "127.0.0.1");
|
||||
d.readU32(3, &utmp, 0);
|
||||
|
||||
if ((utmp > 1023) && (utmp < 65535)) {
|
||||
m_reverseAPIPort = utmp;
|
||||
} else {
|
||||
m_reverseAPIPort = 8888;
|
||||
}
|
||||
|
||||
d.readU32(4, &utmp, 0);
|
||||
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user