1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

NFM demod: squelch slider with 0.1 dB precision

This commit is contained in:
f4exb 2015-09-14 02:15:08 +02:00
parent 6b29864484
commit e75ab1c53e
3 changed files with 9 additions and 6 deletions

View File

@ -349,8 +349,8 @@ void NFMDemod::apply()
if (m_config.m_squelch != m_running.m_squelch)
{
// input is a power level in dB
m_squelchLevel = pow(10.0, m_config.m_squelch / 10.0);
// input is a value in tenths of dB
m_squelchLevel = pow(10.0, m_config.m_squelch / 100.0);
//m_squelchLevel *= m_squelchLevel;
m_afSquelch.setThreshold(m_squelchLevel);
}

View File

@ -181,7 +181,7 @@ void NFMDemodGUI::on_volume_valueChanged(int value)
void NFMDemodGUI::on_squelch_valueChanged(int value)
{
ui->squelchText->setText(QString("%1 dB").arg(value));
ui->squelchText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1));
applySettings();
}

View File

@ -130,8 +130,11 @@
</item>
<item row="4" column="4">
<widget class="QSlider" name="squelch">
<property name="toolTip">
<string>Threshold min/max in dB</string>
</property>
<property name="minimum">
<number>-30</number>
<number>-200</number>
</property>
<property name="maximum">
<number>0</number>
@ -140,7 +143,7 @@
<number>1</number>
</property>
<property name="value">
<number>-20</number>
<number>-150</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -214,7 +217,7 @@
</size>
</property>
<property name="text">
<string>-40 dB</string>
<string>-15.0</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>