mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-24 03:02:29 -04:00
ATV Demod: beter smooth out the channel power display
This commit is contained in:
parent
c008a23327
commit
f3e3549773
@ -58,7 +58,7 @@ ATVDemod::ATVDemod() :
|
|||||||
m_intNumberOfLines=0;
|
m_intNumberOfLines=0;
|
||||||
m_intNumberOfRowsToDisplay=0;
|
m_intNumberOfRowsToDisplay=0;
|
||||||
|
|
||||||
m_objMagSqAverage.resize(16, 1.0);
|
m_objMagSqAverage.resize(32, 1.0);
|
||||||
|
|
||||||
memset((void*)m_fltBufferI,0,6*sizeof(float));
|
memset((void*)m_fltBufferI,0,6*sizeof(float));
|
||||||
memset((void*)m_fltBufferQ,0,6*sizeof(float));
|
memset((void*)m_fltBufferQ,0,6*sizeof(float));
|
||||||
|
@ -304,6 +304,8 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI,
|
|||||||
|
|
||||||
//ui->screenTV->connectTimer(m_objPluginAPI->getMainWindow()->getMasterTimer());
|
//ui->screenTV->connectTimer(m_objPluginAPI->getMainWindow()->getMasterTimer());
|
||||||
|
|
||||||
|
m_objMagSqAverage.resize(4, 1.0);
|
||||||
|
|
||||||
resetToDefaults(); // does applySettings()
|
resetToDefaults(); // does applySettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,7 +381,7 @@ void ATVDemodGUI::enterEvent(QEvent*)
|
|||||||
|
|
||||||
void ATVDemodGUI::tick()
|
void ATVDemodGUI::tick()
|
||||||
{
|
{
|
||||||
if (m_intTickCount < 10) // ~500 ms
|
if (m_intTickCount < 4) // ~200 ms
|
||||||
{
|
{
|
||||||
m_intTickCount++;
|
m_intTickCount++;
|
||||||
}
|
}
|
||||||
@ -387,7 +389,8 @@ void ATVDemodGUI::tick()
|
|||||||
{
|
{
|
||||||
if (m_objATVDemod)
|
if (m_objATVDemod)
|
||||||
{
|
{
|
||||||
double magSqDB = CalcDb::dbPower(m_objATVDemod->getMagSq() / (1<<30));
|
m_objMagSqAverage.feed(m_objATVDemod->getMagSq());
|
||||||
|
double magSqDB = CalcDb::dbPower(m_objMagSqAverage.average() / (1<<30));
|
||||||
ui->channePowerText->setText(tr("%1 dB").arg(magSqDB, 0, 'f', 1));
|
ui->channePowerText->setText(tr("%1 dB").arg(magSqDB, 0, 'f', 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ private:
|
|||||||
bool m_blnBasicSettingsShown;
|
bool m_blnBasicSettingsShown;
|
||||||
bool m_blnDoApplySettings;
|
bool m_blnDoApplySettings;
|
||||||
|
|
||||||
|
MovingAverage<double> m_objMagSqAverage;
|
||||||
int m_intTickCount;
|
int m_intTickCount;
|
||||||
|
|
||||||
explicit ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI, QWidget* objParent = NULL);
|
explicit ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI, QWidget* objParent = NULL);
|
||||||
|
@ -209,8 +209,17 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="rfOppBWText">
|
<widget class="QLabel" name="rfOppBWText">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>10.0</string>
|
<string>1.0</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -256,12 +265,12 @@
|
|||||||
<widget class="QLabel" name="rfBWText">
|
<widget class="QLabel" name="rfBWText">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>54</width>
|
<width>60</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>10.0 MHz</string>
|
<string>1.0 MHz</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user