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

DSD demod: changed squelch 0.1 dB steps to 1 dB steps

This commit is contained in:
f4exb 2018-10-22 14:51:47 +02:00
parent 67de0d9c57
commit eed10172f4
4 changed files with 12 additions and 18 deletions

View File

@ -236,8 +236,8 @@ void DSDDemodGUI::on_squelchGate_valueChanged(int value)
void DSDDemodGUI::on_squelch_valueChanged(int value)
{
ui->squelchText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1));
m_settings.m_squelch = value / 10.0;
ui->squelchText->setText(QString("%1").arg(value / 1.0, 0, 'f', 0));
m_settings.m_squelch = value;
applySettings();
}
@ -413,8 +413,8 @@ void DSDDemodGUI::displaySettings()
ui->fmDeviation->setValue(m_settings.m_fmDeviation / 100.0);
ui->fmDeviationText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(ui->fmDeviation->value() / 10.0, 0, 'f', 1));
ui->squelch->setValue(m_settings.m_squelch * 10.0);
ui->squelchText->setText(QString("%1").arg(ui->squelch->value() / 10.0, 0, 'f', 1));
ui->squelch->setValue(m_settings.m_squelch);
ui->squelchText->setText(QString("%1").arg(ui->squelch->value() / 1.0, 0, 'f', 0));
ui->squelchGate->setValue(m_settings.m_squelchGate);
ui->squelchGateText->setText(QString("%1").arg(ui->squelchGate->value() * 10.0, 0, 'f', 0));

View File

@ -399,7 +399,7 @@
<string>Squelch threshold (dB)</string>
</property>
<property name="minimum">
<number>-1000</number>
<number>-100</number>
</property>
<property name="maximum">
<number>0</number>
@ -411,7 +411,7 @@
<number>1</number>
</property>
<property name="value">
<number>-150</number>
<number>-40</number>
</property>
</widget>
</item>
@ -419,21 +419,15 @@
<widget class="QLabel" name="squelchText">
<property name="minimumSize">
<size>
<width>0</width>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</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>

View File

@ -27,7 +27,7 @@
const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
QString("DSD Demodulator"),
QString("4.1.0"),
QString("4.2.4"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -61,7 +61,7 @@ QByteArray DSDDemodSettings::serialize() const
s.writeS32(2, m_rfBandwidth/100.0);
s.writeS32(3, m_demodGain*100.0);
s.writeS32(4, m_fmDeviation/100.0);
s.writeS32(5, m_squelch*10.0);
s.writeS32(5, m_squelch);
s.writeU32(7, m_rgbColor);
s.writeS32(8, m_squelchGate);
s.writeS32(9, m_volume*10.0);
@ -120,8 +120,8 @@ bool DSDDemodSettings::deserialize(const QByteArray& data)
m_demodGain = tmp / 100.0;
d.readS32(4, &tmp, 50);
m_fmDeviation = tmp * 100.0;
d.readS32(5, &tmp, -400);
m_squelch = tmp / 10.0;
d.readS32(5, &tmp, -40);
m_squelch = tmp < -100 ? tmp / 10.0 : tmp;
d.readU32(7, &m_rgbColor);
d.readS32(8, &m_squelchGate, 5);
d.readS32(9, &tmp, 20);