1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-17 21:28:43 -04:00

Moving average cleanup

This commit is contained in:
f4exb
2018-02-03 10:33:02 +01:00
parent 4cd6d5bd6e
commit b0a97510e2
47 changed files with 108 additions and 152 deletions
+2 -3
View File
@@ -266,7 +266,6 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampl
m_deviceUISet(deviceUISet),
m_channelMarker(this),
m_doApplySettings(true),
m_channelPowerDbAvg(20,0),
m_recordLength(0),
m_recordSampleRate(48000),
m_samplesCount(0),
@@ -395,8 +394,8 @@ void AMModGUI::enterEvent(QEvent*)
void AMModGUI::tick()
{
double powDb = CalcDb::dbPower(m_amMod->getMagSq());
m_channelPowerDbAvg.feed(powDb);
ui->channelPower->setText(tr("%1 dB").arg(m_channelPowerDbAvg.average(), 0, 'f', 1));
m_channelPowerDbAvg(powDb);
ui->channelPower->setText(tr("%1 dB").arg(m_channelPowerDbAvg.asDouble(), 0, 'f', 1));
if (((++m_tickCount & 0xf) == 0) && (m_modAFInput == AMMod::AMModInputFile))
{