mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
DATV demod: GUI changes (4)
This commit is contained in:
parent
b2e446afcc
commit
0486462398
@ -265,7 +265,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Channel power</string>
|
||||
<string>Channel power (dB)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-100.0 dB</string>
|
||||
|
@ -787,6 +787,7 @@ void DATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVect
|
||||
//Complex objC;
|
||||
fftfilt::cmplx *objRF;
|
||||
int intRFOut;
|
||||
double magSq;
|
||||
|
||||
//********** Bis repetita : Let's rock and roll buddy ! **********
|
||||
|
||||
@ -849,6 +850,8 @@ void DATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVect
|
||||
{
|
||||
objIQ.re = objRF->real();
|
||||
objIQ.im = objRF->imag();
|
||||
magSq = objIQ.re*objIQ.re + objIQ.im*objIQ.im;
|
||||
m_objMagSqAverage(magSq);
|
||||
|
||||
objRF ++;
|
||||
|
||||
|
@ -61,6 +61,7 @@ class DownChannelizer;
|
||||
#include "dsp/agc.h"
|
||||
#include "audio/audiofifo.h"
|
||||
#include "util/message.h"
|
||||
#include "util/movingaverage.h"
|
||||
#include <QBuffer>
|
||||
|
||||
#include "datvideostream.h"
|
||||
@ -236,6 +237,7 @@ public:
|
||||
void CleanUpDATVFramework(bool blnRelease);
|
||||
int GetSampleRate();
|
||||
void InitDATVFramework();
|
||||
double getMagSq() const { return m_objMagSqAverage; } //!< Beware this is scaled to 2^30
|
||||
|
||||
static const QString m_channelIdURI;
|
||||
static const QString m_channelId;
|
||||
@ -458,6 +460,7 @@ private:
|
||||
//QElapsedTimer m_objTimer;
|
||||
|
||||
DATVConfig m_objRunning;
|
||||
MovingAverageUtil<double, double, 32> m_objMagSqAverage;
|
||||
|
||||
QMutex m_objSettingsMutex;
|
||||
|
||||
|
@ -503,6 +503,13 @@ void DATVDemodGUI::enterEvent(QEvent*)
|
||||
|
||||
void DATVDemodGUI::tick()
|
||||
{
|
||||
if (m_objDATVDemod)
|
||||
{
|
||||
m_objMagSqAverage(m_objDATVDemod->getMagSq());
|
||||
double magSqDB = CalcDb::dbPower(m_objMagSqAverage / (SDR_RX_SCALED*SDR_RX_SCALED));
|
||||
ui->channePowerText->setText(tr("%1 dB").arg(magSqDB, 0, 'f', 1));
|
||||
}
|
||||
|
||||
if((m_intLastDecodedData-m_intPreviousDecodedData)>=0)
|
||||
{
|
||||
m_intLastSpeed = 8*(m_intLastDecodedData-m_intPreviousDecodedData);
|
||||
|
@ -120,6 +120,8 @@ private:
|
||||
bool m_blnDoApplySettings;
|
||||
bool m_blnButtonPlayClicked;
|
||||
|
||||
MovingAverageUtil<double, double, 4> m_objMagSqAverage;
|
||||
|
||||
explicit DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* objParent = 0);
|
||||
virtual ~DATVDemodGUI();
|
||||
|
||||
|
@ -165,6 +165,19 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="channePowerText">
|
||||
<property name="toolTip">
|
||||
<string>Channel power (dB)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-100.0 dB</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
Loading…
Reference in New Issue
Block a user