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