mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 08:04:49 -05:00
NFM demod: changed squelch 0.1 dB steps to 1 dB steps
This commit is contained in:
parent
993ab36a29
commit
b99afedc4a
@ -523,14 +523,14 @@ void NFMDemod::applySettings(const NFMDemodSettings& settings, bool force)
|
||||
(settings.m_deltaSquelch != m_settings.m_deltaSquelch) || force)
|
||||
{
|
||||
if (settings.m_deltaSquelch)
|
||||
{ // input is a value in negative millis
|
||||
m_squelchLevel = (- settings.m_squelch) / 1000.0;
|
||||
{ // input is a value in negative centis
|
||||
m_squelchLevel = (- settings.m_squelch) / 100.0;
|
||||
m_afSquelch.setThreshold(m_squelchLevel);
|
||||
m_afSquelch.reset();
|
||||
}
|
||||
else
|
||||
{ // input is a value in centi-Bels
|
||||
m_squelchLevel = std::pow(10.0, settings.m_squelch / 100.0);
|
||||
{ // input is a value in deci-Bels
|
||||
m_squelchLevel = std::pow(10.0, settings.m_squelch / 10.0);
|
||||
m_movingAverage.reset();
|
||||
}
|
||||
|
||||
|
@ -182,12 +182,12 @@ void NFMDemodGUI::on_squelch_valueChanged(int value)
|
||||
{
|
||||
if (ui->deltaSquelch->isChecked())
|
||||
{
|
||||
ui->squelchText->setText(QString("%1").arg(-value / 10.0, 0, 'f', 1));
|
||||
ui->squelchText->setText(QString("%1").arg(-value / 1.0, 0, 'f', 0));
|
||||
ui->squelchText->setToolTip(tr("Squelch deviation threshold (%)"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->squelchText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1));
|
||||
ui->squelchText->setText(QString("%1").arg(value / 1.0, 0, 'f', 0));
|
||||
ui->squelchText->setToolTip(tr("Squelch power threshold (dB)"));
|
||||
}
|
||||
m_settings.m_squelch = value * 1.0;
|
||||
@ -368,13 +368,13 @@ void NFMDemodGUI::displaySettings()
|
||||
|
||||
if (m_settings.m_deltaSquelch)
|
||||
{
|
||||
ui->squelchText->setText(QString("%1").arg((-m_settings.m_squelch) / 10.0, 0, 'f', 1));
|
||||
ui->squelchText->setText(QString("%1").arg((-m_settings.m_squelch) / 1.0, 0, 'f', 0));
|
||||
ui->squelchText->setToolTip(tr("Squelch AF balance threshold (%)"));
|
||||
ui->squelch->setToolTip(tr("Squelch AF balance threshold (%)"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->squelchText->setText(QString("%1").arg(m_settings.m_squelch / 10.0, 0, 'f', 1));
|
||||
ui->squelchText->setText(QString("%1").arg(m_settings.m_squelch / 1.0, 0, 'f', 0));
|
||||
ui->squelchText->setToolTip(tr("Squelch power threshold (dB)"));
|
||||
ui->squelch->setToolTip(tr("Squelch AF balance threshold (%)"));
|
||||
}
|
||||
|
@ -428,7 +428,7 @@
|
||||
<string>Squelch threshold (dB)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1000</number>
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>0</number>
|
||||
@ -440,7 +440,7 @@
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-150</number>
|
||||
<number>-100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -448,21 +448,15 @@
|
||||
<widget class="QLabel" name="squelchText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<width>28</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Squelch threshold (dB)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-15.0</string>
|
||||
<string>-100</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
|
@ -44,7 +44,7 @@ void NFMDemodSettings::resetToDefaults()
|
||||
m_fmDeviation = 2000;
|
||||
m_squelchGate = 5; // 10s of ms at 48000 Hz sample rate. Corresponds to 2400 for AGC attack
|
||||
m_deltaSquelch = false;
|
||||
m_squelch = -300.0;
|
||||
m_squelch = -30.0;
|
||||
m_volume = 1.0;
|
||||
m_ctcssOn = false;
|
||||
m_audioMute = false;
|
||||
@ -109,8 +109,8 @@ bool NFMDemodSettings::deserialize(const QByteArray& data)
|
||||
m_afBandwidth = tmp * 1000.0;
|
||||
d.readS32(4, &tmp, 20);
|
||||
m_volume = tmp / 10.0;
|
||||
d.readS32(5, &tmp, -300);
|
||||
m_squelch = tmp * 1.0;
|
||||
d.readS32(5, &tmp, -30);
|
||||
m_squelch = (tmp < -100 ? -100 : tmp) * 1.0;
|
||||
d.readU32(7, &m_rgbColor, QColor(255, 0, 0).rgb());
|
||||
d.readS32(8, &m_ctcssIndex, 0);
|
||||
d.readBool(9, &m_ctcssOn, false);
|
||||
|
@ -33,7 +33,7 @@ struct NFMDemodSettings
|
||||
int m_fmDeviation;
|
||||
int m_squelchGate;
|
||||
bool m_deltaSquelch;
|
||||
Real m_squelch; //!< centi-Bels
|
||||
Real m_squelch; //!< deci-Bels
|
||||
Real m_volume;
|
||||
bool m_ctcssOn;
|
||||
bool m_audioMute;
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
|
||||
QString("NFM Demodulator"),
|
||||
QString("4.1.0"),
|
||||
QString("4.2.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -46,7 +46,7 @@ Use this button to toggle between AF (on) and RF power (off) based squelch.
|
||||
|
||||
<h4>Power threshold mode</h4>
|
||||
|
||||
Case when the delta/Level squelch control (7) is off (power). This is the squelch threshold in dB. The average total power received in the signal bandwidth before demodulation is compared to this value and the squelch input is open above this value. It can be varied continuously in 0.1 dB steps from 0.0 to -100.0 dB using the dial button.
|
||||
Case when the delta/Level squelch control (7) is off (power). This is the squelch threshold in dB. The average total power received in the signal bandwidth before demodulation is compared to this value and the squelch input is open above this value. It can be varied continuously in 1 dB steps from 0 to -100 dB using the dial button.
|
||||
|
||||
<h4>Audio frequency delta mode</h4>
|
||||
|
||||
|
@ -81,7 +81,7 @@ PluginInterface::SamplingDevices PerseusPlugin::enumSampleSources()
|
||||
1,
|
||||
0));
|
||||
|
||||
qDebug("PerseusPlugin::enumSampleSources: enumerated PlutoSDR device #%d", i);
|
||||
qDebug("PerseusPlugin::enumSampleSources: enumerated Perseus device #%d", i);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -2802,7 +2802,7 @@ margin-bottom: 20px;
|
||||
"squelch" : {
|
||||
"type" : "number",
|
||||
"format" : "float",
|
||||
"description" : "power squelch threshold in centi-bels"
|
||||
"description" : "power squelch threshold in deci-bels"
|
||||
},
|
||||
"volume" : {
|
||||
"type" : "number",
|
||||
@ -23242,7 +23242,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-10-03T06:02:12.961+02:00
|
||||
Generated 2018-10-11T08:49:05.249+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -21,7 +21,7 @@ NFMDemodSettings:
|
||||
deltaSquelch:
|
||||
type: integer
|
||||
squelch:
|
||||
description: power squelch threshold in centi-bels
|
||||
description: power squelch threshold in deci-bels
|
||||
type: number
|
||||
format: float
|
||||
volume:
|
||||
|
@ -21,7 +21,7 @@ NFMDemodSettings:
|
||||
deltaSquelch:
|
||||
type: integer
|
||||
squelch:
|
||||
description: power squelch threshold in centi-bels
|
||||
description: power squelch threshold in deci-bels
|
||||
type: number
|
||||
format: float
|
||||
volume:
|
||||
|
@ -2802,7 +2802,7 @@ margin-bottom: 20px;
|
||||
"squelch" : {
|
||||
"type" : "number",
|
||||
"format" : "float",
|
||||
"description" : "power squelch threshold in centi-bels"
|
||||
"description" : "power squelch threshold in deci-bels"
|
||||
},
|
||||
"volume" : {
|
||||
"type" : "number",
|
||||
@ -23242,7 +23242,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-10-03T06:02:12.961+02:00
|
||||
Generated 2018-10-11T08:49:05.249+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -252,7 +252,7 @@ def setupChannel(deviceset_url, options):
|
||||
settings["NFMDemodSettings"]["afBandwidth"] = options.af_bw * 1000
|
||||
settings["NFMDemodSettings"]["rfBandwidth"] = options.rf_bw
|
||||
settings["NFMDemodSettings"]["volume"] = options.volume
|
||||
settings["NFMDemodSettings"]["squelch"] = options.squelch_db * 10 # centi-Bels
|
||||
settings["NFMDemodSettings"]["squelch"] = options.squelch_db # deci-Bels
|
||||
settings["NFMDemodSettings"]["squelchGate"] = options.squelch_gate // 10 # 10's of ms
|
||||
settings["NFMDemodSettings"]["title"] = "Channel %d" % i
|
||||
elif options.channel_id == "BFMDemod":
|
||||
|
@ -164,7 +164,7 @@ def main():
|
||||
settings["NFMDemodSettings"]["rfBandwidth"] = 12500
|
||||
settings["NFMDemodSettings"]["fmDeviation"] = 3000
|
||||
settings["NFMDemodSettings"]["afBandwidth"] = 4000
|
||||
settings["NFMDemodSettings"]["squelch"] = -700
|
||||
settings["NFMDemodSettings"]["squelch"] = -70
|
||||
settings["NFMDemodSettings"]["volume"] = 2.0
|
||||
|
||||
if options.udp_copy is not None:
|
||||
|
@ -191,7 +191,7 @@ def setupChannels(scan_control, options):
|
||||
settings["NFMDemodSettings"]["afBandwidth"] = options.af_bw * 1000
|
||||
settings["NFMDemodSettings"]["rfBandwidth"] = options.rf_bw
|
||||
settings["NFMDemodSettings"]["volume"] = options.volume
|
||||
settings["NFMDemodSettings"]["squelch"] = options.squelch_db * 10 # centi-Bels
|
||||
settings["NFMDemodSettings"]["squelch"] = options.squelch_db # deci-Bels
|
||||
settings["NFMDemodSettings"]["squelchGate"] = options.squelch_gate / 10 # 10's of ms
|
||||
settings["NFMDemodSettings"]["title"] = "Channel %d" % i
|
||||
elif options.channel_id == "AMDemod":
|
||||
|
Loading…
Reference in New Issue
Block a user