1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-14 20:31:53 -05:00

Initialise PhaseDiscriminators state, to avoid outputting huge values.

This commit is contained in:
Jon Beniston 2023-08-30 17:34:54 +01:00
parent 2724530148
commit 313370aa44
2 changed files with 15 additions and 1 deletions

View File

@ -819,6 +819,8 @@ void PagerDemodGUI::makeUIConnections()
QObject::connect(ui->logEnable, &ButtonSwitch::clicked, this, &PagerDemodGUI::on_logEnable_clicked); QObject::connect(ui->logEnable, &ButtonSwitch::clicked, this, &PagerDemodGUI::on_logEnable_clicked);
QObject::connect(ui->logFilename, &QToolButton::clicked, this, &PagerDemodGUI::on_logFilename_clicked); QObject::connect(ui->logFilename, &QToolButton::clicked, this, &PagerDemodGUI::on_logFilename_clicked);
QObject::connect(ui->logOpen, &QToolButton::clicked, this, &PagerDemodGUI::on_logOpen_clicked); QObject::connect(ui->logOpen, &QToolButton::clicked, this, &PagerDemodGUI::on_logOpen_clicked);
QObject::connect(ui->channel1, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PagerDemodGUI::on_channel1_currentIndexChanged);
QObject::connect(ui->channel2, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &PagerDemodGUI::on_channel2_currentIndexChanged);
} }
void PagerDemodGUI::updateAbsoluteCenterFrequency() void PagerDemodGUI::updateAbsoluteCenterFrequency()

View File

@ -25,13 +25,25 @@
class PhaseDiscriminators class PhaseDiscriminators
{ {
public: public:
/**
PhaseDiscriminators() :
m_fmScaling(1.0f)
{
reset();
}
/**
* Reset stored values * Reset stored values
*/ */
void reset() void reset()
{ {
m_m1Sample = 0; m_m1Sample = 0;
m_m2Sample = 0; m_m2Sample = 0;
m_fltPreviousI = 0.0f;
m_fltPreviousQ = 0.0f;
m_fltPreviousI2 = 0.0f;
m_fltPreviousQ2 = 0.0f;
m_prevArg = 0.0f;
} }
/** /**