mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-30 03:38:55 -05:00
SDRdaemonFEC support: debug (4). Corrected buffer gauge display
This commit is contained in:
parent
a628357f76
commit
cded6772ae
@ -123,18 +123,12 @@ public:
|
||||
if (m_framesNbBytes)
|
||||
{
|
||||
int32_t val = (m_wrDeltaEstimate * 100) / (int32_t) m_framesNbBytes;
|
||||
|
||||
if (val < -50) {
|
||||
return val + 100; // read leads (positive)
|
||||
} else if (val < 50) {
|
||||
return val; // read leads (positive) or write leads (negative)
|
||||
} else {
|
||||
return val - 100; // write leads (negative)
|
||||
}
|
||||
// conversion: [-100:-50[ : read leads (+) / [-50:0[ : read lags (-) / [0:50[ : read leads (+) / [50:100{ : read lags (-)
|
||||
return val < 0 ? -val - 50 : 50 -val;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -50; // default position
|
||||
return 0; // default position
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -608,11 +608,11 @@ void SDRdaemonFECGui::updateWithStreamTime()
|
||||
QString s = QString::number(m_bufferLengthInSecs, 'f', 1);
|
||||
ui->bufferLenSecsText->setText(tr("%1").arg(s));
|
||||
|
||||
s = QString::number((m_bufferGauge < 0 ? -50 - m_bufferGauge : 50 - m_bufferGauge), 'f', 0);
|
||||
s = QString::number(m_bufferGauge, 'f', 0);
|
||||
ui->bufferRWBalanceText->setText(tr("%1").arg(s));
|
||||
|
||||
ui->bufferGaugeNegative->setValue((m_bufferGauge < 0 ? 50 + m_bufferGauge : 0));
|
||||
ui->bufferGaugePositive->setValue((m_bufferGauge < 0 ? 0 : 50 - m_bufferGauge));
|
||||
ui->bufferGaugeNegative->setValue((m_bufferGauge < 0 ? -m_bufferGauge : 0));
|
||||
ui->bufferGaugePositive->setValue((m_bufferGauge < 0 ? 0 : m_bufferGauge));
|
||||
|
||||
s = QString::number(m_curNbBlocks, 'f', 0);
|
||||
ui->avgNbBlocksText->setText(tr("%1").arg(s));
|
||||
|
Loading…
Reference in New Issue
Block a user