mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
M17 demod: reset BER stats manually
This commit is contained in:
parent
9c6ce3ad9e
commit
f47496645f
@ -246,6 +246,8 @@ public:
|
||||
m_basebandSink->getBERT(bertErrors, bertBits);
|
||||
}
|
||||
|
||||
void resetPRBS() { m_basebandSink->resetPRBS(); }
|
||||
|
||||
uint32_t getLSFCount() const { return m_basebandSink->getLSFCount(); }
|
||||
const QString& getSrcCall() const { return m_basebandSink->getSrcCall(); }
|
||||
const QString& getDestcCall() const { return m_basebandSink->getDestcCall(); }
|
||||
|
@ -107,6 +107,8 @@ public:
|
||||
m_sink.getBERT(bertErrors, bertBits);
|
||||
}
|
||||
|
||||
void resetPRBS() { m_sink.resetPRBS(); }
|
||||
|
||||
uint32_t getLSFCount() const { return m_sink.getLSFCount(); }
|
||||
const QString& getSrcCall() const { return m_sink.getSrcCall(); }
|
||||
const QString& getDestcCall() const { return m_sink.getDestcCall(); }
|
||||
|
@ -311,6 +311,15 @@ void M17DemodGUI::on_berButton_toggled(bool checked)
|
||||
m_showBERNumbersOrRates = !checked;
|
||||
}
|
||||
|
||||
void M17DemodGUI::on_berReset_clicked()
|
||||
{
|
||||
m_m17Demod->resetPRBS();
|
||||
m_lastBERErrors = 0;
|
||||
m_lastBERBits = 0;
|
||||
m_berPoints.clear();
|
||||
m_currentErrors.clear();
|
||||
}
|
||||
|
||||
void M17DemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
||||
{
|
||||
(void) widget;
|
||||
@ -826,15 +835,6 @@ void M17DemodGUI::tick()
|
||||
series->attachAxis(berChartYAxis);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// qDebug("M17DemodGUI::tick: BER reset: status: %d sync_word_type: %d", status, sync_word_type);
|
||||
m_lastBERErrors = 0;
|
||||
m_lastBERBits = 0;
|
||||
m_berPoints.clear();
|
||||
m_currentErrors.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
m_tickCount++;
|
||||
@ -973,6 +973,7 @@ void M17DemodGUI::makeUIConnections()
|
||||
QObject::connect(ui->curButton, &ButtonSwitch::toggled, this, &M17DemodGUI::on_curButton_toggled);
|
||||
QObject::connect(ui->berButton, &ButtonSwitch::toggled, this, &M17DemodGUI::on_berButton_toggled);
|
||||
QObject::connect(ui->berHistory, &QDial::valueChanged, this, &M17DemodGUI::on_berHistory_valueChanged);
|
||||
QObject::connect(ui->berReset, &QPushButton::clicked, this, &M17DemodGUI::on_berReset_clicked);
|
||||
}
|
||||
|
||||
void M17DemodGUI::updateAbsoluteCenterFrequency()
|
||||
|
@ -158,6 +158,7 @@ private slots:
|
||||
void on_curButton_toggled(bool checked);
|
||||
void on_berButton_toggled(bool checked);
|
||||
void on_berHistory_valueChanged(int value);
|
||||
void on_berReset_clicked();
|
||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||
void onMenuDialogCalled(const QPoint& p);
|
||||
void on_viewStatusLog_clicked();
|
||||
|
@ -1847,6 +1847,26 @@
|
||||
<string>BER</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="berReset">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<y>10</y>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Reset BER (PRBS)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../sdrgui/resources/res.qrc">
|
||||
<normaloff>:/recycle.png</normaloff>:/recycle.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -138,10 +138,6 @@ void M17DemodProcessor::diagnostic_callback(
|
||||
qDebug() << "M17DemodProcessor::diagnostic_callback: " << oss.str().c_str();
|
||||
}
|
||||
|
||||
if ((!dcd) && m_this->m_prbs.sync()) { // Seems like there should be a better way to do this.
|
||||
m_this->m_prbs.reset();
|
||||
}
|
||||
|
||||
if (m_this->m_prbs.sync() && !quiet)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
@ -98,6 +98,10 @@ public:
|
||||
bertBits = m_prbs.bits();
|
||||
}
|
||||
|
||||
void resetPRBS() {
|
||||
m_prbs.reset();
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<uint8_t> m_currentPacket;
|
||||
size_t m_packetFrameCounter;
|
||||
|
@ -109,6 +109,8 @@ public:
|
||||
m_m17DemodProcessor.getBERT(bertErrors, bertBits);
|
||||
}
|
||||
|
||||
void resetPRBS() { m_m17DemodProcessor.resetPRBS(); }
|
||||
|
||||
uint32_t getLSFCount() const { return m_m17DemodProcessor.getLSFCount(); }
|
||||
const QString& getSrcCall() const { return m_m17DemodProcessor.getSrcCall(); }
|
||||
const QString& getDestcCall() const { return m_m17DemodProcessor.getDestcCall(); }
|
||||
|
@ -72,7 +72,7 @@ bool M17ModProcessor::handleMessage(const Message& cmd)
|
||||
if (notif.getInsertPosition())
|
||||
{
|
||||
if (m_insertPositionToggle) {
|
||||
strData += "!" + formatAPRSPosition();
|
||||
strData = "!" + formatAPRSPosition();
|
||||
} else {
|
||||
strData = notif.getData();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user