mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-04 16:01:14 -05:00
BFM and DSD Demods: added signal strength gauge. Limit height on all signal gauges
This commit is contained in:
parent
e6047fbdf3
commit
30de817ba6
@ -56,7 +56,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -199,7 +208,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>30</height>
|
<height>26</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@ -378,6 +387,26 @@
|
|||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../sdrbase/resources/res.qrc"/>
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -63,7 +63,11 @@ BFMDemod::BFMDemod(BasebandSampleSink* sampleSink, RDSParser *rdsParser) :
|
|||||||
m_audioBuffer.resize(16384);
|
m_audioBuffer.resize(16384);
|
||||||
m_audioBufferFill = 0;
|
m_audioBufferFill = 0;
|
||||||
|
|
||||||
m_movingAverage.resize(16, 0);
|
// m_movingAverage.resize(16, 0);
|
||||||
|
m_magsq = 0.0f;
|
||||||
|
m_magsqSum = 0.0f;
|
||||||
|
m_magsqPeak = 0.0f;
|
||||||
|
m_magsqCount = 0;
|
||||||
|
|
||||||
DSPEngine::instance()->addAudioSink(&m_audioFifo);
|
DSPEngine::instance()->addAudioSink(&m_audioFifo);
|
||||||
}
|
}
|
||||||
@ -121,10 +125,20 @@ void BFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
|||||||
{
|
{
|
||||||
msq = rf[i].real()*rf[i].real() + rf[i].imag()*rf[i].imag();
|
msq = rf[i].real()*rf[i].real() + rf[i].imag()*rf[i].imag();
|
||||||
|
|
||||||
m_movingAverage.feed(msq);
|
m_magsqSum += msq;
|
||||||
|
|
||||||
if(m_movingAverage.average() >= m_squelchLevel)
|
if (msq > m_magsqPeak)
|
||||||
|
{
|
||||||
|
m_magsqPeak = msq;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_magsqCount++;
|
||||||
|
|
||||||
|
// m_movingAverage.feed(msq);
|
||||||
|
|
||||||
|
if(m_magsq >= m_squelchLevel) {
|
||||||
m_squelchState = m_running.m_rfBandwidth / 20; // decay rate
|
m_squelchState = m_running.m_rfBandwidth / 20; // decay rate
|
||||||
|
}
|
||||||
|
|
||||||
if(m_squelchState > 0)
|
if(m_squelchState > 0)
|
||||||
{
|
{
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
virtual void stop();
|
virtual void stop();
|
||||||
virtual bool handleMessage(const Message& cmd);
|
virtual bool handleMessage(const Message& cmd);
|
||||||
|
|
||||||
Real getMagSq() const { return m_movingAverage.average(); }
|
Real getMagSq() const { return m_magsq; }
|
||||||
|
|
||||||
bool getPilotLock() const { return m_pilotPLL.locked(); }
|
bool getPilotLock() const { return m_pilotPLL.locked(); }
|
||||||
Real getPilotLevel() const { return m_pilotPLL.get_pilot_level(); }
|
Real getPilotLevel() const { return m_pilotPLL.get_pilot_level(); }
|
||||||
@ -69,6 +69,17 @@ public:
|
|||||||
Real getDemodQua() const { return m_rdsDemod.m_report.qua; }
|
Real getDemodQua() const { return m_rdsDemod.m_report.qua; }
|
||||||
Real getDemodFclk() const { return m_rdsDemod.m_report.fclk; }
|
Real getDemodFclk() const { return m_rdsDemod.m_report.fclk; }
|
||||||
|
|
||||||
|
void getMagSqLevels(Real& avg, Real& peak, int& nbSamples)
|
||||||
|
{
|
||||||
|
avg = m_magsqSum / m_magsqCount;
|
||||||
|
m_magsq = avg;
|
||||||
|
peak = m_magsqPeak;
|
||||||
|
nbSamples = m_magsqCount;
|
||||||
|
m_magsqSum = 0.0f;
|
||||||
|
m_magsqPeak = 0.0f;
|
||||||
|
m_magsqCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class MsgConfigureBFMDemod : public Message {
|
class MsgConfigureBFMDemod : public Message {
|
||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
@ -196,7 +207,11 @@ private:
|
|||||||
|
|
||||||
Real m_m1Arg; //!> x^-1 real sample
|
Real m_m1Arg; //!> x^-1 real sample
|
||||||
|
|
||||||
MovingAverage<Real> m_movingAverage;
|
// MovingAverage<Real> m_movingAverage;
|
||||||
|
Real m_magsq;
|
||||||
|
Real m_magsqSum;
|
||||||
|
Real m_magsqPeak;
|
||||||
|
int m_magsqCount;
|
||||||
|
|
||||||
AudioVector m_audioBuffer;
|
AudioVector m_audioBuffer;
|
||||||
uint m_audioBufferFill;
|
uint m_audioBufferFill;
|
||||||
|
@ -374,6 +374,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||||
ui->deltaFrequency->setValueRange(7, 0U, 9999999U);
|
ui->deltaFrequency->setValueRange(7, 0U, 9999999U);
|
||||||
|
ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue);
|
||||||
|
|
||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||||
@ -476,9 +477,22 @@ void BFMDemodGUI::enterEvent(QEvent*)
|
|||||||
|
|
||||||
void BFMDemodGUI::tick()
|
void BFMDemodGUI::tick()
|
||||||
{
|
{
|
||||||
Real powDb = CalcDb::dbPower(m_bfmDemod->getMagSq());
|
Real magsqAvg, magsqPeak;
|
||||||
m_channelPowerDbAvg.feed(powDb);
|
int nbMagsqSamples;
|
||||||
ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1));
|
m_bfmDemod->getMagSqLevels(magsqAvg, magsqPeak, nbMagsqSamples);
|
||||||
|
Real powDbAvg = CalcDb::dbPower(magsqAvg);
|
||||||
|
Real powDbPeak = CalcDb::dbPower(magsqPeak);
|
||||||
|
|
||||||
|
ui->channelPowerMeter->levelChanged(
|
||||||
|
(100.0f + powDbAvg) / 100.0f,
|
||||||
|
(100.0f + powDbPeak) / 100.0f,
|
||||||
|
nbMagsqSamples);
|
||||||
|
|
||||||
|
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
|
||||||
|
|
||||||
|
// Real powDb = CalcDb::dbPower(m_bfmDemod->getMagSq());
|
||||||
|
// m_channelPowerDbAvg.feed(powDb);
|
||||||
|
// ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1));
|
||||||
|
|
||||||
Real pilotPowDb = CalcDb::dbPower(m_bfmDemod->getPilotLevel());
|
Real pilotPowDb = CalcDb::dbPower(m_bfmDemod->getPilotLevel());
|
||||||
QString pilotPowDbStr;
|
QString pilotPowDbStr;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>411</width>
|
<width>411</width>
|
||||||
<height>121</height>
|
<height>151</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -38,7 +38,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -241,6 +250,36 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="channelPowerMeterLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="channelPowerMeterUnits">
|
||||||
|
<property name="text">
|
||||||
|
<string>dB</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="LevelMeterSignalDB" name="channelPowerMeter" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>26</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Level meter (dB) top trace: average, bottom trace: instantaneous peak, tip: peak hold</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="rfBandwidthLayout">
|
<layout class="QHBoxLayout" name="rfBandwidthLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -443,7 +482,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -465,7 +513,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>150</y>
|
<y>170</y>
|
||||||
<width>791</width>
|
<width>791</width>
|
||||||
<height>301</height>
|
<height>301</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -1775,6 +1823,12 @@
|
|||||||
<extends>QToolButton</extends>
|
<extends>QToolButton</extends>
|
||||||
<header>gui/buttonswitch.h</header>
|
<header>gui/buttonswitch.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>LevelMeterSignalDB</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>gui/levelmeter.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>GLSpectrum</class>
|
<class>GLSpectrum</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
@ -1790,6 +1844,26 @@
|
|||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../sdrbase/resources/res.qrc"/>
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -67,7 +67,11 @@ DSDDemod::DSDDemod(BasebandSampleSink* sampleSink) :
|
|||||||
m_sampleBuffer = new qint16[1<<17]; // 128 kS
|
m_sampleBuffer = new qint16[1<<17]; // 128 kS
|
||||||
m_sampleBufferIndex = 0;
|
m_sampleBufferIndex = 0;
|
||||||
|
|
||||||
m_movingAverage.resize(50, 0);
|
// m_movingAverage.resize(50, 0);
|
||||||
|
m_magsq = 0.0f;
|
||||||
|
m_magsqSum = 0.0f;
|
||||||
|
m_magsqPeak = 0.0f;
|
||||||
|
m_magsqCount = 0;
|
||||||
|
|
||||||
DSPEngine::instance()->addAudioSink(&m_audioFifo1);
|
DSPEngine::instance()->addAudioSink(&m_audioFifo1);
|
||||||
DSPEngine::instance()->addAudioSink(&m_audioFifo2);
|
DSPEngine::instance()->addAudioSink(&m_audioFifo2);
|
||||||
@ -136,8 +140,17 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
|||||||
{
|
{
|
||||||
qint16 sample, delayedSample;
|
qint16 sample, delayedSample;
|
||||||
|
|
||||||
m_magsq = ((ci.real()*ci.real() + ci.imag()*ci.imag()));
|
Real magsq = ((ci.real()*ci.real() + ci.imag()*ci.imag())) / (1<<30);
|
||||||
m_movingAverage.feed(m_magsq);
|
// m_movingAverage.feed(m_magsq);
|
||||||
|
|
||||||
|
m_magsqSum += magsq;
|
||||||
|
|
||||||
|
if (magsq > m_magsqPeak)
|
||||||
|
{
|
||||||
|
m_magsqPeak = magsq;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_magsqCount++;
|
||||||
|
|
||||||
Real demod = 32768.0f * m_phaseDiscri.phaseDiscriminator(ci) * ((float) m_running.m_demodGain / 100.0f);
|
Real demod = 32768.0f * m_phaseDiscri.phaseDiscriminator(ci) * ((float) m_running.m_demodGain / 100.0f);
|
||||||
m_sampleCount++;
|
m_sampleCount++;
|
||||||
|
@ -67,11 +67,22 @@ public:
|
|||||||
m_dsdDemodGUI = dsdDemodGUI;
|
m_dsdDemodGUI = dsdDemodGUI;
|
||||||
}
|
}
|
||||||
|
|
||||||
double getMagSq() { return m_movingAverage.average() / (double) (1<<30); }
|
double getMagSq() { return m_magsq; }
|
||||||
bool getSquelchOpen() const { return m_squelchOpen; }
|
bool getSquelchOpen() const { return m_squelchOpen; }
|
||||||
|
|
||||||
const DSDDecoder& getDecoder() const { return m_dsdDecoder; }
|
const DSDDecoder& getDecoder() const { return m_dsdDecoder; }
|
||||||
|
|
||||||
|
void getMagSqLevels(Real& avg, Real& peak, int& nbSamples)
|
||||||
|
{
|
||||||
|
avg = m_magsqSum / m_magsqCount;
|
||||||
|
m_magsq = avg;
|
||||||
|
peak = m_magsqPeak;
|
||||||
|
nbSamples = m_magsqCount;
|
||||||
|
m_magsqSum = 0.0f;
|
||||||
|
m_magsqPeak = 0.0f;
|
||||||
|
m_magsqCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class MsgConfigureMyPosition : public Message {
|
class MsgConfigureMyPosition : public Message {
|
||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
@ -251,8 +262,11 @@ private:
|
|||||||
bool m_squelchOpen;
|
bool m_squelchOpen;
|
||||||
|
|
||||||
Real m_lastArgument;
|
Real m_lastArgument;
|
||||||
MovingAverage<double> m_movingAverage;
|
// MovingAverage<double> m_movingAverage;
|
||||||
double m_magsq;
|
Real m_magsq;
|
||||||
|
Real m_magsqSum;
|
||||||
|
Real m_magsqPeak;
|
||||||
|
int m_magsqCount;
|
||||||
|
|
||||||
Real m_fmExcursion;
|
Real m_fmExcursion;
|
||||||
|
|
||||||
|
@ -370,6 +370,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
|
|||||||
connect(&m_pluginAPI->getMainWindow()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&m_pluginAPI->getMainWindow()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
|
|
||||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold));
|
||||||
|
ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue);
|
||||||
|
|
||||||
m_channelizer = new DownChannelizer(m_dsdDemod);
|
m_channelizer = new DownChannelizer(m_dsdDemod);
|
||||||
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this);
|
||||||
@ -619,9 +620,22 @@ void DSDDemodGUI::formatStatusText()
|
|||||||
|
|
||||||
void DSDDemodGUI::tick()
|
void DSDDemodGUI::tick()
|
||||||
{
|
{
|
||||||
Real powDb = CalcDb::dbPower(m_dsdDemod->getMagSq());
|
Real magsqAvg, magsqPeak;
|
||||||
m_channelPowerDbAvg.feed(powDb);
|
int nbMagsqSamples;
|
||||||
ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1));
|
m_dsdDemod->getMagSqLevels(magsqAvg, magsqPeak, nbMagsqSamples);
|
||||||
|
Real powDbAvg = CalcDb::dbPower(magsqAvg);
|
||||||
|
Real powDbPeak = CalcDb::dbPower(magsqPeak);
|
||||||
|
|
||||||
|
ui->channelPowerMeter->levelChanged(
|
||||||
|
(100.0f + powDbAvg) / 100.0f,
|
||||||
|
(100.0f + powDbPeak) / 100.0f,
|
||||||
|
nbMagsqSamples);
|
||||||
|
|
||||||
|
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
|
||||||
|
|
||||||
|
// Real powDb = CalcDb::dbPower(m_dsdDemod->getMagSq());
|
||||||
|
// m_channelPowerDbAvg.feed(powDb);
|
||||||
|
// ui->channelPower->setText(QString::number(m_channelPowerDbAvg.average(), 'f', 1));
|
||||||
|
|
||||||
bool squelchOpen = m_dsdDemod->getSquelchOpen();
|
bool squelchOpen = m_dsdDemod->getSquelchOpen();
|
||||||
|
|
||||||
|
@ -370,6 +370,36 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="channelPowerMeterLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="channelPowerMeterUnits">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Level meter (dB) top trace: average, bottom trace: instantaneous peak, tip: peak hold</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>dB</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="LevelMeterSignalDB" name="channelPowerMeter" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>26</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="rfBWLayout">
|
<layout class="QHBoxLayout" name="rfBWLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -908,6 +938,17 @@
|
|||||||
<header>gui/valuedial.h</header>
|
<header>gui/valuedial.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>ButtonSwitch</class>
|
||||||
|
<extends>QToolButton</extends>
|
||||||
|
<header>gui/buttonswitch.h</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>LevelMeterSignalDB</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>gui/levelmeter.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>GLScope</class>
|
<class>GLScope</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
@ -920,11 +961,6 @@
|
|||||||
<header>gui/glscopegui.h</header>
|
<header>gui/glscopegui.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>ButtonSwitch</class>
|
|
||||||
<extends>QToolButton</extends>
|
|
||||||
<header>gui/buttonswitch.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../sdrbase/resources/res.qrc"/>
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
@ -945,6 +981,9 @@
|
|||||||
<include location="../../../sdrbase/resources/res.qrc"/>
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
<include location="../../../sdrbase/resources/res.qrc"/>
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
<include location="../../../sdrbase/resources/res.qrc"/>
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -53,7 +53,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -181,7 +190,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>30</height>
|
<height>26</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@ -593,6 +602,26 @@
|
|||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../sdrbase/resources/res.qrc"/>
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -53,7 +53,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -239,7 +248,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>30</height>
|
<height>26</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -475,7 +484,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -513,6 +531,12 @@
|
|||||||
<header>gui/valuedial.h</header>
|
<header>gui/valuedial.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>LevelMeterSignalDB</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>gui/levelmeter.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>GLSpectrum</class>
|
<class>GLSpectrum</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
@ -525,15 +549,29 @@
|
|||||||
<header>gui/glspectrumgui.h</header>
|
<header>gui/glspectrumgui.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>LevelMeterSignalDB</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header>gui/levelmeter.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../sdrbase/resources/res.qrc"/>
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
|
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user