mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-23 00:18:37 -05:00
WFM: channel power averaging for display
This commit is contained in:
parent
876c257aaf
commit
6a9743bb3d
@ -213,7 +213,8 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, QWidget* parent) :
|
||||
ui(new Ui::WFMDemodGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_channelMarker(this),
|
||||
m_basicSettingsShown(false)
|
||||
m_basicSettingsShown(false),
|
||||
m_channelPowerDbAvg(20,0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||
@ -295,5 +296,6 @@ void WFMDemodGUI::enterEvent(QEvent*)
|
||||
void WFMDemodGUI::tick()
|
||||
{
|
||||
Real powDb = CalcDb::dbPower(m_wfmDemod->getMagSq());
|
||||
ui->channelPower->setText(QString::number(powDb, 'f', 1));
|
||||
m_channelPowerDbAvg.feed(powDb);
|
||||
ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1));
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "gui/rollupwidget.h"
|
||||
#include "plugin/plugingui.h"
|
||||
#include "dsp/channelmarker.h"
|
||||
#include "dsp/movingaverage.h"
|
||||
|
||||
class PluginAPI;
|
||||
|
||||
@ -55,6 +56,7 @@ private:
|
||||
ThreadedSampleSink* m_threadedChannelizer;
|
||||
Channelizer* m_channelizer;
|
||||
WFMDemod* m_wfmDemod;
|
||||
MovingAverage<Real> m_channelPowerDbAvg;
|
||||
|
||||
static const int m_rfBW[];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user