1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

NFM demod: fixed squelch display

This commit is contained in:
f4exb 2018-10-11 16:09:40 +02:00
parent ed1b706661
commit a7b954dbf8

View File

@ -164,15 +164,15 @@ void NFMDemodGUI::on_deltaSquelch_toggled(bool checked)
{ {
if (checked) if (checked)
{ {
ui->squelchText->setText(QString("%1").arg((-ui->squelch->value()) / 10.0, 0, 'f', 1)); ui->squelchText->setText(QString("%1").arg((-ui->squelch->value()) / 1.0, 0, 'f', 0));
ui->squelchText->setToolTip(tr("Squelch AF balance threshold (%)")); ui->squelchText->setToolTip(tr("Squelch AF balance threshold (%)"));
ui->squelch->setToolTip(tr("Squelch AF balance threshold (%)")); ui->squelch->setToolTip(tr("Squelch AF balance threshold (%)"));
} }
else else
{ {
ui->squelchText->setText(QString("%1").arg(ui->squelch->value() / 10.0, 0, 'f', 1)); ui->squelchText->setText(QString("%1").arg(ui->squelch->value() / 1.0, 0, 'f', 0));
ui->squelchText->setToolTip(tr("Squelch power threshold (dB)")); ui->squelchText->setToolTip(tr("Squelch power threshold (dB)"));
ui->squelch->setToolTip(tr("Squelch AF balance threshold (%)")); ui->squelch->setToolTip(tr("Squelch power threshold (dB)"));
} }
m_settings.m_deltaSquelch = checked; m_settings.m_deltaSquelch = checked;
applySettings(); applySettings();
@ -183,12 +183,14 @@ void NFMDemodGUI::on_squelch_valueChanged(int value)
if (ui->deltaSquelch->isChecked()) if (ui->deltaSquelch->isChecked())
{ {
ui->squelchText->setText(QString("%1").arg(-value / 1.0, 0, 'f', 0)); ui->squelchText->setText(QString("%1").arg(-value / 1.0, 0, 'f', 0));
ui->squelchText->setToolTip(tr("Squelch deviation threshold (%)")); ui->squelchText->setToolTip(tr("Squelch AF balance threshold (%)"));
ui->squelch->setToolTip(tr("Squelch AF balance threshold (%)"));
} }
else else
{ {
ui->squelchText->setText(QString("%1").arg(value / 1.0, 0, 'f', 0)); ui->squelchText->setText(QString("%1").arg(value / 1.0, 0, 'f', 0));
ui->squelchText->setToolTip(tr("Squelch power threshold (dB)")); ui->squelchText->setToolTip(tr("Squelch power threshold (dB)"));
ui->squelch->setToolTip(tr("Squelch power threshold (dB)"));
} }
m_settings.m_squelch = value * 1.0; m_settings.m_squelch = value * 1.0;
applySettings(); applySettings();
@ -376,7 +378,7 @@ void NFMDemodGUI::displaySettings()
{ {
ui->squelchText->setText(QString("%1").arg(m_settings.m_squelch / 1.0, 0, 'f', 0)); ui->squelchText->setText(QString("%1").arg(m_settings.m_squelch / 1.0, 0, 'f', 0));
ui->squelchText->setToolTip(tr("Squelch power threshold (dB)")); ui->squelchText->setToolTip(tr("Squelch power threshold (dB)"));
ui->squelch->setToolTip(tr("Squelch AF balance threshold (%)")); ui->squelch->setToolTip(tr("Squelch power threshold (dB)"));
} }
ui->ctcssOn->setChecked(m_settings.m_ctcssOn); ui->ctcssOn->setChecked(m_settings.m_ctcssOn);