Skip to content

Commit

Permalink
FT8 Demod: limit upper bandwidth to 5.8 kHz
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Dec 2, 2024
1 parent 1f0a8e3 commit ec4d14b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions plugins/channelrx/demodft8/ft8demod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,10 @@ void FT8Demod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("spanLog2")) {
settings.m_filterBank[settings.m_filterIndex].m_spanLog2 = response.getFt8DemodSettings()->getSpanLog2();
}
if (channelSettingsKeys.contains("rfBandwidth")) {
settings.m_filterBank[settings.m_filterIndex].m_rfBandwidth = response.getFt8DemodSettings()->getRfBandwidth();
if (channelSettingsKeys.contains("rfBandwidth"))
{
float bw = response.getFt8DemodSettings()->getRfBandwidth();
settings.m_filterBank[settings.m_filterIndex].m_rfBandwidth = bw > 5800.0f ? 5800.0f : bw; // Hard limit upper bandwidth to 5800 Hx fixes #2339
}
if (channelSettingsKeys.contains("lowCutoff")) {
settings.m_filterBank[settings.m_filterIndex].m_lowCutoff = response.getFt8DemodSettings()->getLowCutoff();
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodft8/ft8demodgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ FT8DemodGUI::FT8DemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban

m_ft8Demod->setLevelMeter(ui->volumeMeter);

ui->BW->setMaximum(60);
ui->BW->setMaximum(58);
ui->BW->setMinimum(10);
ui->lowCut->setMaximum(50);
ui->lowCut->setMinimum(0);
Expand Down Expand Up @@ -759,7 +759,7 @@ void FT8DemodGUI::applyBandwidths(unsigned int spanLog2, bool force)
ui->BW->blockSignals(true);
ui->lowCut->blockSignals(true);

ui->BW->setMaximum(bwMax);
ui->BW->setMaximum(bwMax > 58 ? 58 : bwMax); // Cap to 5.8k fixes #2339
ui->BW->setMinimum(0);
ui->BW->setValue(bw);

Expand Down
2 changes: 1 addition & 1 deletion plugins/channelrx/demodft8/ft8demodgui.ui
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@
<number>0</number>
</property>
<property name="maximum">
<number>60</number>
<number>58</number>
</property>
<property name="pageStep">
<number>1</number>
Expand Down
1 change: 1 addition & 0 deletions plugins/channelrx/demodft8/ft8demodsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ bool FT8DemodSettings::deserialize(const QByteArray& data)
{
d.readS32(100 + 10*i, &m_filterBank[i].m_spanLog2, 3);
d.readS32(101 + 10*i, &tmp, 30);
tmp = tmp > 58 ? 58 : tmp; // Hard limit upper bandwidth fixes #2339
m_filterBank[i].m_rfBandwidth = tmp * 100.0;
d.readS32(102+ 10*i, &tmp, 3);
m_filterBank[i].m_lowCutoff = tmp * 100.0;
Expand Down
2 changes: 1 addition & 1 deletion plugins/channelrx/demodft8/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Values are expressed in kHz and step is 100 Hz.

<h3>A.9: RF filter high cutoff</h3>

Values are expressed in kHz and step is 100 Hz.
Values are expressed in kHz and step is 100 Hz. This is limited to 5800 Hz,

<h3>A.10: Volume</h3>

Expand Down

0 comments on commit ec4d14b

Please sign in to comment.