BFM and WFM demods: Fixed initial RF BW display on deserialization

This commit is contained in:
f4exb 2015-12-08 02:23:58 +01:00
parent e533997dbe
commit 9fdff1e028
3 changed files with 18 additions and 3 deletions

View File

@ -128,12 +128,18 @@ bool BFMDemodGUI::deserialize(const QByteArray& data)
d.readS32(1, &tmp, 0);
m_channelMarker.setCenterFrequency(tmp);
d.readS32(2, &tmp, 4);
ui->rfBW->setValue(tmp);
ui->rfBWText->setText(QString("%1 kHz").arg(m_rfBW[tmp] / 1000.0));
m_channelMarker.setBandwidth(m_rfBW[tmp]);
d.readS32(3, &tmp, 3);
ui->afBW->setValue(tmp);
d.readS32(4, &tmp, 20);
ui->volume->setValue(tmp);
d.readS32(5, &tmp, -40);
ui->squelch->setValue(tmp);

View File

@ -7,19 +7,22 @@
<x>0</x>
<y>0</y>
<width>252</width>
<height>324</height>
<height>333</height>
</rect>
</property>
<property name="windowTitle">
<string>Broadcast FM Demod</string>
</property>
<property name="toolTip">
<string/>
</property>
<widget class="QWidget" name="settingsContainer" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>235</width>
<height>111</height>
<height>121</height>
</rect>
</property>
<property name="windowTitle">
@ -339,7 +342,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>150</y>
<y>160</y>
<width>231</width>
<height>156</height>
</rect>

View File

@ -108,12 +108,18 @@ bool WFMDemodGUI::deserialize(const QByteArray& data)
d.readS32(1, &tmp, 0);
m_channelMarker.setCenterFrequency(tmp);
d.readS32(2, &tmp, 4);
ui->rfBW->setValue(tmp);
ui->rfBWText->setText(QString("%1 kHz").arg(m_rfBW[tmp] / 1000.0));
m_channelMarker.setBandwidth(m_rfBW[tmp]);
d.readS32(3, &tmp, 3);
ui->afBW->setValue(tmp);
d.readS32(4, &tmp, 20);
ui->volume->setValue(tmp);
d.readS32(5, &tmp, -40);
ui->squelch->setValue(tmp);