mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-18 06:12:47 -04:00
NFM demod: squelch slider with 0.1 dB precision
This commit is contained in:
parent
6b29864484
commit
e75ab1c53e
@ -349,8 +349,8 @@ void NFMDemod::apply()
|
|||||||
|
|
||||||
if (m_config.m_squelch != m_running.m_squelch)
|
if (m_config.m_squelch != m_running.m_squelch)
|
||||||
{
|
{
|
||||||
// input is a power level in dB
|
// input is a value in tenths of dB
|
||||||
m_squelchLevel = pow(10.0, m_config.m_squelch / 10.0);
|
m_squelchLevel = pow(10.0, m_config.m_squelch / 100.0);
|
||||||
//m_squelchLevel *= m_squelchLevel;
|
//m_squelchLevel *= m_squelchLevel;
|
||||||
m_afSquelch.setThreshold(m_squelchLevel);
|
m_afSquelch.setThreshold(m_squelchLevel);
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ void NFMDemodGUI::on_volume_valueChanged(int value)
|
|||||||
|
|
||||||
void NFMDemodGUI::on_squelch_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();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,8 +130,11 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="4" column="4">
|
<item row="4" column="4">
|
||||||
<widget class="QSlider" name="squelch">
|
<widget class="QSlider" name="squelch">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Threshold min/max in dB</string>
|
||||||
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-30</number>
|
<number>-200</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@ -140,7 +143,7 @@
|
|||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
<property name="value">
|
||||||
<number>-20</number>
|
<number>-150</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -214,7 +217,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-40 dB</string>
|
<string>-15.0</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user