1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 14:04:46 -04:00

SDRdaemonFEC plugin: improve stats on GUI

This commit is contained in:
Edouard Griffiths
2016-07-27 18:49:17 +02:00
parent 286ea81470
commit aa68c907fa
7 changed files with 108 additions and 32 deletions
@@ -33,6 +33,7 @@ SDRdaemonFECBuffer::SDRdaemonFECBuffer(uint32_t throttlems) :
m_decoderIndexHead(nbDecoderSlots/2),
m_curNbBlocks(0),
m_minNbBlocks(256),
m_minOriginalBlocks(128),
m_curNbRecovery(0),
m_maxNbRecovery(0),
m_framesDecoded(true),
@@ -89,8 +90,10 @@ void SDRdaemonFECBuffer::initDecodeSlot(int slotIndex)
// collect stats before voiding the slot
m_curNbBlocks = m_decoderSlots[slotIndex].m_blockCount;
m_curOriginalBlocks = m_decoderSlots[slotIndex].m_originalCount;
m_curNbRecovery = m_decoderSlots[slotIndex].m_recoveryCount;
m_avgNbBlocks(m_curNbBlocks);
m_avgOrigBlocks(m_curOriginalBlocks);
m_avgNbRecovery(m_curNbRecovery);
m_framesDecoded = m_framesDecoded && m_decoderSlots[slotIndex].m_decoded;
@@ -98,6 +101,10 @@ void SDRdaemonFECBuffer::initDecodeSlot(int slotIndex)
m_minNbBlocks = m_curNbBlocks;
}
if (m_curOriginalBlocks < m_minOriginalBlocks) {
m_minOriginalBlocks = m_curOriginalBlocks;
}
if (m_curNbRecovery > m_maxNbRecovery) {
m_maxNbRecovery = m_curNbRecovery;
}