1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 18:43:28 -05:00

WDSP receiver: Removed SNB

This commit is contained in:
f4exb 2024-07-03 19:25:28 +02:00
parent 7be39b1b55
commit 8b10dd05ff
8 changed files with 4 additions and 50 deletions

View File

@ -21,6 +21,7 @@
#include <vector>
#include <QNetworkRequest>
#include <QRecursiveMutex>
#include "dsp/mimochannel.h"
#include "dsp/spectrumvis.h"
@ -185,7 +186,7 @@ private:
ScopeVis m_scopeSink;
QThread *m_thread;
InterferometerBaseband* m_basebandSink;
QMutex m_mutex;
QRecursiveMutex m_mutex;
bool m_running;
InterferometerSettings m_settings;
MessageQueue *m_guiMessageQueue; //!< Input message queue to the GUI

View File

@ -29,14 +29,6 @@ WDSPRxDNRDialog::~WDSPRxDNRDialog()
delete ui;
}
void WDSPRxDNRDialog::setSNB(bool snb)
{
ui->snb->blockSignals(true);
ui->snb->setChecked(snb);
ui->snb->blockSignals(false);
m_snb = snb;
}
void WDSPRxDNRDialog::setANF(bool anf)
{
ui->anf->blockSignals(true);
@ -85,12 +77,6 @@ void WDSPRxDNRDialog::setNR2ArtifactReduction(bool nr2ArtifactReducion)
m_nr2ArtifactReduction = nr2ArtifactReducion;
}
void WDSPRxDNRDialog::on_snb_clicked(bool checked)
{
m_snb = checked;
emit valueChanged(ChangedSNB);
}
void WDSPRxDNRDialog::on_anf_clicked(bool checked)
{
m_anf = checked;

View File

@ -30,7 +30,6 @@ class SDRGUI_API WDSPRxDNRDialog : public QDialog {
Q_OBJECT
public:
enum ValueChanged {
ChangedSNB,
ChangedANF,
ChangedNR,
ChangedNR2Gain,
@ -42,7 +41,6 @@ public:
explicit WDSPRxDNRDialog(QWidget* parent = nullptr);
~WDSPRxDNRDialog();
void setSNB(bool snb);
void setANF(bool anf);
void setNRScheme(WDSPRxProfile::WDSPRxNRScheme scheme);
void setNR2Gain(WDSPRxProfile::WDSPRxNR2Gain gain);
@ -50,7 +48,6 @@ public:
void setNRPosition(WDSPRxProfile::WDSPRxNRPosition position);
void setNR2ArtifactReduction(bool nr2ArtifactReducion);
bool getSNB() const { return m_snb; }
bool getANF() const { return m_anf; }
WDSPRxProfile::WDSPRxNRScheme getNRScheme() const { return m_nrScheme; }
WDSPRxProfile::WDSPRxNR2Gain getNR2Gain() const { return m_nr2Gain; }
@ -63,7 +60,6 @@ signals:
private:
Ui::WDSPRxDNRDialog *ui;
bool m_snb;
bool m_anf;
WDSPRxProfile::WDSPRxNRScheme m_nrScheme;
WDSPRxProfile::WDSPRxNR2Gain m_nr2Gain;
@ -72,7 +68,6 @@ private:
bool m_nr2ArtifactReduction;
private slots:
void on_snb_clicked(bool checked);
void on_anf_clicked(bool checked);
void on_nr_currentIndexChanged(int index);
void on_nr2Gain_currentIndexChanged(int index);

View File

@ -40,16 +40,6 @@
</item>
</widget>
</item>
<item>
<widget class="QCheckBox" name="snb">
<property name="toolTip">
<string>Spectral Noise Blanker</string>
</property>
<property name="text">
<string>SNB</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="anf">
<property name="toolTip">

View File

@ -301,7 +301,6 @@ void WDSPRxGUI::on_profileIndex_valueChanged(int value)
m_settings.m_nbAvgTime = m_settings.m_profiles[m_settings.m_profileIndex].m_nbAvgTime;
// Noise reduction
m_settings.m_dnr = m_settings.m_profiles[m_settings.m_profileIndex].m_dnr;
m_settings.m_snb = m_settings.m_profiles[m_settings.m_profileIndex].m_snb;
m_settings.m_anf = m_settings.m_profiles[m_settings.m_profileIndex].m_anf;
m_settings.m_nrScheme = m_settings.m_profiles[m_settings.m_profileIndex].m_nrScheme;
m_settings.m_nr2Gain = m_settings.m_profiles[m_settings.m_profileIndex].m_nr2Gain;
@ -908,7 +907,6 @@ void WDSPRxGUI::dnrSetupDialog(const QPoint& p)
{
m_dnrDialog = new WDSPRxDNRDialog();
m_dnrDialog->move(p);
m_dnrDialog->setSNB(m_settings.m_snb);
m_dnrDialog->setANF(m_settings.m_anf);
m_dnrDialog->setNRScheme(m_settings.m_nrScheme);
m_dnrDialog->setNR2Gain(m_settings.m_nr2Gain);
@ -932,11 +930,6 @@ void WDSPRxGUI::dnrSetup(int32_t iValueChanged)
switch (valueChanged)
{
case WDSPRxDNRDialog::ValueChanged::ChangedSNB:
m_settings.m_snb = m_dnrDialog->getSNB();
m_settings.m_profiles[m_settings.m_profileIndex].m_snb = m_settings.m_snb;
applySettings();
break;
case WDSPRxDNRDialog::ValueChanged::ChangedANF:
m_settings.m_anf = m_dnrDialog->getANF();
m_settings.m_profiles[m_settings.m_profileIndex].m_anf = m_settings.m_anf;

View File

@ -63,7 +63,6 @@ void WDSPRxSettings::resetToDefaults()
m_nbAvgTime = 50.0;
// Noise reduction
m_dnr = false;
m_snb = false;
m_anf = false;
m_nrScheme = WDSPRxProfile::NRSchemeNR;
m_nr2Gain = WDSPRxProfile::NR2GainGamma;
@ -125,7 +124,6 @@ QByteArray WDSPRxSettings::serialize() const
s.writeDouble(27, m_nbAvgTime);
// Noise reduction
s.writeBool( 30, m_dnr);
s.writeBool( 31, m_snb);
s.writeBool( 32, m_anf);
s.writeS32( 33, (int) m_nrScheme);
s.writeS32( 34, (int) m_nr2Gain);
@ -182,7 +180,6 @@ QByteArray WDSPRxSettings::serialize() const
s.writeDouble(127 + 50*i, m_profiles[i].m_nbAvgTime);
// Noise reduction
s.writeBool (130 + 50*i, m_profiles[i].m_dnr);
s.writeBool (131 + 50*i, m_profiles[i].m_snb);
s.writeBool (132 + 50*i, m_profiles[i].m_anf);
s.writeS32 (133 + 50*i, (int) m_profiles[i].m_nrScheme);
s.writeS32 (134 + 50*i, (int) m_profiles[i].m_nr2Gain);
@ -253,7 +250,6 @@ bool WDSPRxSettings::deserialize(const QByteArray& data)
d.readDouble(27, &m_nbAvgTime, 50.0);
// Nosie reduction
d.readBool( 30, &m_dnr, false);
d.readBool( 31, &m_snb, false);
d.readBool( 32, &m_anf, false);
d.readS32( 33, &tmp, 2);
m_nrScheme = (WDSPRxProfile::WDSPRxNRScheme) tmp;
@ -330,7 +326,6 @@ bool WDSPRxSettings::deserialize(const QByteArray& data)
d.readDouble(127 + 50*i, &m_profiles[i].m_nbAvgTime, 50.0);
// Noise reduction
d.readBool (130 + 50*i, &m_profiles[i].m_dnr, false);
d.readBool (131 + 50*i, &m_profiles[i].m_snb, false);
d.readBool (132 + 50*i, &m_profiles[i].m_anf, false);
d.readS32 (133 + 50*i, &tmp);
m_profiles[i].m_nrScheme = (WDSPRxProfile::WDSPRxNRScheme) tmp;

View File

@ -100,7 +100,6 @@ struct WDSPRxProfile
double m_nbAvgTime; // a.k.a back tau
// Noise rediction
bool m_dnr;
bool m_snb;
bool m_anf;
WDSPRxNRScheme m_nrScheme;
WDSPRxNR2Gain m_nr2Gain;
@ -134,7 +133,6 @@ struct WDSPRxProfile
m_nbThreshold(30),
m_nbAvgTime(50.0),
m_dnr(false),
m_snb(false),
m_anf(false),
m_nrScheme(NRSchemeNR),
m_nr2Gain(NR2GainGamma),
@ -178,7 +176,6 @@ struct WDSPRxSettings
double m_nbAvgTime;
// Noise reduction
bool m_dnr;
bool m_snb;
bool m_anf;
WDSPRxProfile::WDSPRxNRScheme m_nrScheme;
WDSPRxProfile::WDSPRxNR2Gain m_nr2Gain;

View File

@ -127,6 +127,7 @@ WDSPRxSink::WDSPRxSink() :
);
m_rxa->setSpectrumProbe(&m_spectrumProbe);
WDSP::RXA::SetPassband(*m_rxa, 0, m_Bandwidth);
WDSP::ANR::SetANRVals(*m_rxa, 64, 16, 16e-4, 10e-7);
applyChannelSettings(m_channelSampleRate, m_channelFrequencyOffset, true);
applySettings(m_settings, true);
@ -346,6 +347,7 @@ void WDSPRxSink::applySettings(const WDSPRxSettings& settings, bool force)
<< " m_agcSlope: " << settings.m_agcSlope
<< " m_agcHangThreshold: " << settings.m_agcHangThreshold
<< " m_audioDeviceName: " << settings.m_audioDeviceName
<< " m_anf: "<< settings.m_anf
<< " m_dnr: " << settings.m_dnr
<< " m_nrScheme: " << settings.m_nrScheme
<< " m_nrPosition: "<< settings.m_nrPosition
@ -547,11 +549,6 @@ void WDSPRxSink::applySettings(const WDSPRxSettings& settings, bool force)
WDSP::ANF::SetANFRun(*m_rxa, settings.m_anf ? 1 : 0);
}
// Caution: Causes corruption
if ((m_settings.m_snb != settings.m_snb) || force) {
WDSP::SNBA::SetSNBARun(*m_rxa, settings.m_snb ? 1 : 0);
}
// CW Peaking
if ((m_settings.m_cwPeaking != settings.m_cwPeaking) || force) {