mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-01 04:37:52 -04:00
DATV: Display MER
This commit is contained in:
parent
42815a0664
commit
0dc554b30b
@ -66,6 +66,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SetTVScreen(TVScreen *objScreen) { m_basebandSink->setTVScreen(objScreen); }
|
void SetTVScreen(TVScreen *objScreen) { m_basebandSink->setTVScreen(objScreen); }
|
||||||
|
void setMERLabel(QLabel *merLabel) { m_basebandSink->setMERLabel(merLabel); }
|
||||||
DATVideostream *SetVideoRender(DATVideoRender *objScreen) { return m_basebandSink->SetVideoRender(objScreen); }
|
DATVideostream *SetVideoRender(DATVideoRender *objScreen) { return m_basebandSink->SetVideoRender(objScreen); }
|
||||||
bool audioActive() { return m_basebandSink->audioActive(); }
|
bool audioActive() { return m_basebandSink->audioActive(); }
|
||||||
bool audioDecodeOK() { return m_basebandSink->audioDecodeOK(); }
|
bool audioDecodeOK() { return m_basebandSink->audioDecodeOK(); }
|
||||||
|
@ -86,6 +86,7 @@ public:
|
|||||||
int getChannelSampleRate() const;
|
int getChannelSampleRate() const;
|
||||||
double getMagSq() const { return m_sink.getMagSq(); }
|
double getMagSq() const { return m_sink.getMagSq(); }
|
||||||
void setTVScreen(TVScreen *tvScreen) { m_sink.setTVScreen(tvScreen); }
|
void setTVScreen(TVScreen *tvScreen) { m_sink.setTVScreen(tvScreen); }
|
||||||
|
void setMERLabel(QLabel *merLabel) { m_sink.setMERLabel(merLabel); }
|
||||||
void setMessageQueueToGUI(MessageQueue *messageQueue) { m_sink.setMessageQueueToGUI(messageQueue); }
|
void setMessageQueueToGUI(MessageQueue *messageQueue) { m_sink.setMessageQueueToGUI(messageQueue); }
|
||||||
void setBasebandSampleRate(int sampleRate); //!< To be used when supporting thread is stopped
|
void setBasebandSampleRate(int sampleRate); //!< To be used when supporting thread is stopped
|
||||||
DATVideostream *SetVideoRender(DATVideoRender *objScreen) { return m_sink.SetVideoRender(objScreen); }
|
DATVideostream *SetVideoRender(DATVideoRender *objScreen) { return m_sink.SetVideoRender(objScreen); }
|
||||||
@ -115,4 +116,4 @@ private slots:
|
|||||||
void handleData(); //!< Handle data when samples have to be processed
|
void handleData(); //!< Handle data when samples have to be processed
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_CHANNELANALYZERBASEBAND_H
|
#endif // INCLUDE_CHANNELANALYZERBASEBAND_H
|
||||||
|
@ -195,6 +195,7 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
|
|||||||
m_objDATVDemod->setMessageQueueToGUI(getInputMessageQueue());
|
m_objDATVDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||||
|
|
||||||
m_objDATVDemod->SetTVScreen(ui->screenTV);
|
m_objDATVDemod->SetTVScreen(ui->screenTV);
|
||||||
|
m_objDATVDemod->setMERLabel(ui->merText);
|
||||||
|
|
||||||
connect(m_objDATVDemod->SetVideoRender(ui->screenTV_2), &DATVideostream::onDataPackets, this, &DATVDemodGUI::on_StreamDataAvailable);
|
connect(m_objDATVDemod->SetVideoRender(ui->screenTV_2), &DATVideostream::onDataPackets, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||||
connect(ui->screenTV_2, &DATVideoRender::onMetaDataChanged, this, &DATVDemodGUI::on_StreamMetaDataChanged);
|
connect(ui->screenTV_2, &DATVideoRender::onMetaDataChanged, this, &DATVDemodGUI::on_StreamMetaDataChanged);
|
||||||
|
@ -738,7 +738,7 @@
|
|||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>260</y>
|
<y>260</y>
|
||||||
<width>481</width>
|
<width>481</width>
|
||||||
<height>25</height>
|
<height>33</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="udpLayout">
|
<layout class="QHBoxLayout" name="udpLayout">
|
||||||
@ -825,6 +825,77 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>300</y>
|
||||||
|
<width>481</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="merLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>MER</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="merText">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>28</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>00.0</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="cnrLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>CNR</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="cnrText">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>28</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>00.0</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="videoTab">
|
<widget class="QWidget" name="videoTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -32,11 +32,12 @@ const unsigned int DATVDemodSink::m_rfFilterFftLength = 1024;
|
|||||||
|
|
||||||
DATVDemodSink::DATVDemodSink() :
|
DATVDemodSink::DATVDemodSink() :
|
||||||
m_blnNeedConfigUpdate(false),
|
m_blnNeedConfigUpdate(false),
|
||||||
m_objRegisteredTVScreen(0),
|
m_objRegisteredTVScreen(nullptr),
|
||||||
m_objRegisteredVideoRender(0),
|
m_objRegisteredVideoRender(nullptr),
|
||||||
m_objVideoStream(nullptr),
|
m_objVideoStream(nullptr),
|
||||||
m_udpStream(leansdr::tspacket::SIZE),
|
m_udpStream(leansdr::tspacket::SIZE),
|
||||||
m_objRenderThread(nullptr),
|
m_objRenderThread(nullptr),
|
||||||
|
m_merLabel(nullptr),
|
||||||
m_audioFifo(48000),
|
m_audioFifo(48000),
|
||||||
m_blnRenderingVideo(false),
|
m_blnRenderingVideo(false),
|
||||||
m_blnStartStopVideo(false),
|
m_blnStartStopVideo(false),
|
||||||
@ -86,6 +87,11 @@ bool DATVDemodSink::setTVScreen(TVScreen *objScreen)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DATVDemodSink::setMERLabel(QLabel *merLabel)
|
||||||
|
{
|
||||||
|
m_merLabel = merLabel;
|
||||||
|
}
|
||||||
|
|
||||||
DATVideostream *DATVDemodSink::SetVideoRender(DATVideoRender *objScreen)
|
DATVideostream *DATVDemodSink::SetVideoRender(DATVideoRender *objScreen)
|
||||||
{
|
{
|
||||||
m_objRegisteredVideoRender = objScreen;
|
m_objRegisteredVideoRender = objScreen;
|
||||||
@ -341,6 +347,9 @@ void DATVDemodSink::CleanUpDATVFramework(bool blnRelease)
|
|||||||
if (r_scope_symbols != nullptr) {
|
if (r_scope_symbols != nullptr) {
|
||||||
delete r_scope_symbols;
|
delete r_scope_symbols;
|
||||||
}
|
}
|
||||||
|
if (r_merGauge != nullptr) {
|
||||||
|
delete r_merGauge;
|
||||||
|
}
|
||||||
|
|
||||||
// INPUT
|
// INPUT
|
||||||
//if(p_rawiq!=nullptr) delete p_rawiq;
|
//if(p_rawiq!=nullptr) delete p_rawiq;
|
||||||
@ -494,6 +503,7 @@ void DATVDemodSink::CleanUpDATVFramework(bool blnRelease)
|
|||||||
|
|
||||||
//CONSTELLATION
|
//CONSTELLATION
|
||||||
r_scope_symbols = nullptr;
|
r_scope_symbols = nullptr;
|
||||||
|
r_merGauge = nullptr;
|
||||||
|
|
||||||
//DVB-S2
|
//DVB-S2
|
||||||
p_slots_dvbs2 = nullptr;
|
p_slots_dvbs2 = nullptr;
|
||||||
@ -765,6 +775,10 @@ void DATVDemodSink::InitDATVFramework()
|
|||||||
r_scope_symbols->calculate_cstln_points();
|
r_scope_symbols->calculate_cstln_points();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_merLabel) {
|
||||||
|
r_merGauge = new leansdr::datvgaugelabel(m_objScheduler, *p_mer, m_merLabel);
|
||||||
|
}
|
||||||
|
|
||||||
// DECONVOLUTION AND SYNCHRONIZATION
|
// DECONVOLUTION AND SYNCHRONIZATION
|
||||||
|
|
||||||
p_bytes = new leansdr::pipebuf<leansdr::u8>(m_objScheduler, "bytes", BUF_BYTES);
|
p_bytes = new leansdr::pipebuf<leansdr::u8>(m_objScheduler, "bytes", BUF_BYTES);
|
||||||
@ -1027,7 +1041,7 @@ void DATVDemodSink::InitDATVS2Framework()
|
|||||||
*(leansdr::pipebuf< leansdr::plslot<leansdr::llr_ss> > *) p_slots_dvbs2,
|
*(leansdr::pipebuf< leansdr::plslot<leansdr::llr_ss> > *) p_slots_dvbs2,
|
||||||
/* p_freq */ nullptr,
|
/* p_freq */ nullptr,
|
||||||
/* p_ss */ nullptr,
|
/* p_ss */ nullptr,
|
||||||
/* p_mer */ nullptr,
|
p_mer,
|
||||||
p_cstln,
|
p_cstln,
|
||||||
/* p_cstln_pls */ nullptr,
|
/* p_cstln_pls */ nullptr,
|
||||||
/*p_iqsymbols*/ nullptr,
|
/*p_iqsymbols*/ nullptr,
|
||||||
@ -1069,6 +1083,10 @@ void DATVDemodSink::InitDATVS2Framework()
|
|||||||
r_scope_symbols_dvbs2->calculate_cstln_points();
|
r_scope_symbols_dvbs2->calculate_cstln_points();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_merLabel) {
|
||||||
|
r_merGauge = new leansdr::datvgaugelabel(m_objScheduler, *p_mer, m_merLabel);
|
||||||
|
}
|
||||||
|
|
||||||
// Bit-flipping mode.
|
// Bit-flipping mode.
|
||||||
// Deinterleave into hard bits.
|
// Deinterleave into hard bits.
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "leansdr/iess.h"
|
#include "leansdr/iess.h"
|
||||||
|
|
||||||
#include "datvconstellation.h"
|
#include "datvconstellation.h"
|
||||||
|
#include "datvgaugelabel.h"
|
||||||
#include "datvdvbs2constellation.h"
|
#include "datvdvbs2constellation.h"
|
||||||
#include "datvvideoplayer.h"
|
#include "datvvideoplayer.h"
|
||||||
#include "datvideostream.h"
|
#include "datvideostream.h"
|
||||||
@ -47,6 +48,7 @@
|
|||||||
|
|
||||||
class TVScreen;
|
class TVScreen;
|
||||||
class DATVideoRender;
|
class DATVideoRender;
|
||||||
|
class QLabel;
|
||||||
|
|
||||||
class DATVDemodSink : public ChannelSampleSink {
|
class DATVDemodSink : public ChannelSampleSink {
|
||||||
public:
|
public:
|
||||||
@ -56,6 +58,7 @@ public:
|
|||||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end);
|
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end);
|
||||||
|
|
||||||
bool setTVScreen(TVScreen *objScreen);
|
bool setTVScreen(TVScreen *objScreen);
|
||||||
|
void setMERLabel(QLabel *merLabel);
|
||||||
DATVideostream * SetVideoRender(DATVideoRender *objScreen);
|
DATVideostream * SetVideoRender(DATVideoRender *objScreen);
|
||||||
bool audioActive();
|
bool audioActive();
|
||||||
bool audioDecodeOK();
|
bool audioDecodeOK();
|
||||||
@ -271,6 +274,7 @@ private:
|
|||||||
//CONSTELLATION
|
//CONSTELLATION
|
||||||
leansdr::datvconstellation<leansdr::f32> *r_scope_symbols;
|
leansdr::datvconstellation<leansdr::f32> *r_scope_symbols;
|
||||||
leansdr::datvdvbs2constellation<leansdr::f32> *r_scope_symbols_dvbs2;
|
leansdr::datvdvbs2constellation<leansdr::f32> *r_scope_symbols_dvbs2;
|
||||||
|
leansdr::datvgaugelabel *r_merGauge;
|
||||||
|
|
||||||
//*************** DATV PARAMETERS ***************
|
//*************** DATV PARAMETERS ***************
|
||||||
TVScreen *m_objRegisteredTVScreen;
|
TVScreen *m_objRegisteredTVScreen;
|
||||||
@ -278,6 +282,7 @@ private:
|
|||||||
DATVideostream *m_objVideoStream;
|
DATVideostream *m_objVideoStream;
|
||||||
DATVUDPStream m_udpStream;
|
DATVUDPStream m_udpStream;
|
||||||
DATVideoRenderThread *m_objRenderThread;
|
DATVideoRenderThread *m_objRenderThread;
|
||||||
|
QLabel *m_merLabel;
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
AudioFifo m_audioFifo;
|
AudioFifo m_audioFifo;
|
||||||
@ -305,4 +310,4 @@ private:
|
|||||||
static const unsigned int m_rfFilterFftLength;
|
static const unsigned int m_rfFilterFftLength;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_DATVDEMODSINK_H
|
#endif // INCLUDE_DATVDEMODSINK_H
|
||||||
|
58
plugins/channelrx/demoddatv/datvgaugelabel.h
Normal file
58
plugins/channelrx/demoddatv/datvgaugelabel.h
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Copyright (C) 2021 Edouard Griffiths, F4EXB //
|
||||||
|
// using LeanSDR Framework (C) 2016 F4DAV //
|
||||||
|
// //
|
||||||
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
|
// it under the terms of the GNU General Public License as published by //
|
||||||
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
|
// (at your option) any later version. //
|
||||||
|
// //
|
||||||
|
// This program is distributed in the hope that it will be useful, //
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
|
// GNU General Public License V3 for more details. //
|
||||||
|
// //
|
||||||
|
// You should have received a copy of the GNU General Public License //
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef DATVGAUGELABEL_H
|
||||||
|
#define DATVGAUGELABEL_H
|
||||||
|
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
#include "leansdr/framework.h"
|
||||||
|
#include "leansdr/sdr.h"
|
||||||
|
|
||||||
|
namespace leansdr {
|
||||||
|
|
||||||
|
struct datvgaugelabel: runnable
|
||||||
|
{
|
||||||
|
leansdr::pipereader<leansdr::f32> m_in;
|
||||||
|
QLabel *m_label;
|
||||||
|
datvgaugelabel(
|
||||||
|
scheduler *sch,
|
||||||
|
leansdr::pipebuf<leansdr::f32> &in,
|
||||||
|
QLabel *label = nullptr,
|
||||||
|
const char *_name = nullptr
|
||||||
|
) :
|
||||||
|
runnable(sch, _name ? _name : in.name),
|
||||||
|
m_in(in),
|
||||||
|
m_label(label)
|
||||||
|
{}
|
||||||
|
|
||||||
|
virtual void run()
|
||||||
|
{
|
||||||
|
while (m_in.readable() >= 1)
|
||||||
|
{
|
||||||
|
leansdr::f32 *p = m_in.rd();
|
||||||
|
m_label->setText(QString("%1").arg(*p, 0, 'f', 1));
|
||||||
|
m_in.read(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace leansdr
|
||||||
|
|
||||||
|
#endif // DATVGAUGELABEL_H
|
@ -1155,7 +1155,12 @@ struct cstln_receiver : runnable
|
|||||||
int max_meas = chunk_size / meas_decimation + 1;
|
int max_meas = chunk_size / meas_decimation + 1;
|
||||||
// Large margin on output_size because mu adjustments
|
// Large margin on output_size because mu adjustments
|
||||||
// can lead to more than chunk_size/min_omega symbols.
|
// can lead to more than chunk_size/min_omega symbols.
|
||||||
while (in.readable() >= chunk_size + sampler->readahead() && out.writable() >= chunk_size && (!freq_out || freq_out->writable() >= max_meas) && (!ss_out || ss_out->writable() >= max_meas) && (!mer_out || mer_out->writable() >= max_meas) && (!cstln_out || cstln_out->writable() >= max_meas))
|
while (in.readable() >= chunk_size + sampler->readahead() &&
|
||||||
|
out.writable() >= chunk_size &&
|
||||||
|
(!freq_out || freq_out->writable() >= max_meas) &&
|
||||||
|
(!ss_out || ss_out->writable() >= max_meas) &&
|
||||||
|
(!mer_out || mer_out->writable() >= max_meas) &&
|
||||||
|
(!cstln_out || cstln_out->writable() >= max_meas))
|
||||||
{
|
{
|
||||||
sampler->update_freq(freqw, chunk_size);
|
sampler->update_freq(freqw, chunk_size);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user