1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 10:05:46 -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) void DSDDemodGUI::on_squelch_valueChanged(int value)
{ {
ui->squelchText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1)); ui->squelchText->setText(QString("%1").arg(value / 1.0, 0, 'f', 0));
m_settings.m_squelch = value / 10.0; m_settings.m_squelch = value;
applySettings(); applySettings();
} }
@ -413,8 +413,8 @@ void DSDDemodGUI::displaySettings()
ui->fmDeviation->setValue(m_settings.m_fmDeviation / 100.0); 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->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->squelch->setValue(m_settings.m_squelch);
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->squelchGate->setValue(m_settings.m_squelchGate); ui->squelchGate->setValue(m_settings.m_squelchGate);
ui->squelchGateText->setText(QString("%1").arg(ui->squelchGate->value() * 10.0, 0, 'f', 0)); 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> <string>Squelch threshold (dB)</string>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>-1000</number> <number>-100</number>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>0</number> <number>0</number>
@ -411,7 +411,7 @@
<number>1</number> <number>1</number>
</property> </property>
<property name="value"> <property name="value">
<number>-150</number> <number>-40</number>
</property> </property>
</widget> </widget>
</item> </item>
@ -419,21 +419,15 @@
<widget class="QLabel" name="squelchText"> <widget class="QLabel" name="squelchText">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>30</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Squelch threshold (dB)</string> <string>Squelch threshold (dB)</string>
</property> </property>
<property name="text"> <property name="text">
<string>-15.0</string> <string>-100</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>

View File

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

View File

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