From 282267dc3846440f307d4b43b7a6036a0454cddb Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 4 Dec 2019 07:19:10 +0100 Subject: [PATCH] ATV demod: removed useless back communication with GUI --- plugins/channelrx/demodatv/CMakeLists.txt | 2 - plugins/channelrx/demodatv/atvdemod.h | 1 - plugins/channelrx/demodatv/atvdemodbaseband.h | 1 - plugins/channelrx/demodatv/atvdemodgui.cpp | 2 - plugins/channelrx/demodatv/atvdemodreport.cpp | 26 --------- plugins/channelrx/demodatv/atvdemodreport.h | 57 ------------------- plugins/channelrx/demodatv/atvdemodsink.cpp | 3 +- plugins/channelrx/demodatv/atvdemodsink.h | 4 -- 8 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 plugins/channelrx/demodatv/atvdemodreport.cpp delete mode 100644 plugins/channelrx/demodatv/atvdemodreport.h diff --git a/plugins/channelrx/demodatv/CMakeLists.txt b/plugins/channelrx/demodatv/CMakeLists.txt index bb670cc5e..52bb83c9c 100644 --- a/plugins/channelrx/demodatv/CMakeLists.txt +++ b/plugins/channelrx/demodatv/CMakeLists.txt @@ -5,7 +5,6 @@ set(atv_SOURCES atvdemodbaseband.cpp atvdemodsink.cpp atvdemodsettings.cpp - atvdemodreport.cpp atvdemodwebapiadapter.cpp atvdemodgui.cpp atvdemodplugin.cpp @@ -17,7 +16,6 @@ set(atv_HEADERS atvdemodbaseband.h atvdemodsink.h atvdemodsettings.h - atvdemodreport.h atvdemodwebapiadapter.h atvdemodgui.h atvdemodplugin.h diff --git a/plugins/channelrx/demodatv/atvdemod.h b/plugins/channelrx/demodatv/atvdemod.h index 0ad79c27f..95b9fe099 100644 --- a/plugins/channelrx/demodatv/atvdemod.h +++ b/plugins/channelrx/demodatv/atvdemod.h @@ -92,7 +92,6 @@ public: double getMagSq() const { return m_basebandSink->getMagSq(); } //!< Beware this is scaled to 2^30 bool getBFOLocked() { return m_basebandSink->getBFOLocked(); } void setVideoTabIndex(int videoTabIndex) { m_basebandSink->setVideoTabIndex(videoTabIndex); } - void propagateMessageQueueToGUI() { m_basebandSink->setMessageQueueToGUI(getMessageQueueToGUI()); } static const QString m_channelIdURI; static const QString m_channelId; diff --git a/plugins/channelrx/demodatv/atvdemodbaseband.h b/plugins/channelrx/demodatv/atvdemodbaseband.h index adaed1586..462c2d2a0 100644 --- a/plugins/channelrx/demodatv/atvdemodbaseband.h +++ b/plugins/channelrx/demodatv/atvdemodbaseband.h @@ -89,7 +89,6 @@ public: void setTVScreen(TVScreen *tvScreen) { m_sink.setTVScreen(tvScreen); } bool getBFOLocked() { return m_sink.getBFOLocked(); } void setVideoTabIndex(int videoTabIndex) { m_sink.setVideoTabIndex(videoTabIndex); } - void setMessageQueueToGUI(MessageQueue *messageQueue) { m_sink.setMessageQueueToGUI(messageQueue); } void setBasebandSampleRate(int sampleRate); //!< To be used when supporting thread is stopped private: diff --git a/plugins/channelrx/demodatv/atvdemodgui.cpp b/plugins/channelrx/demodatv/atvdemodgui.cpp index 2b78070d3..d618fe767 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.cpp +++ b/plugins/channelrx/demodatv/atvdemodgui.cpp @@ -33,7 +33,6 @@ #include "dsp/dspengine.h" #include "mainwindow.h" -#include "atvdemodreport.h" #include "atvdemod.h" ATVDemodGUI* ATVDemodGUI::create(PluginAPI* objPluginAPI, @@ -248,7 +247,6 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base m_scopeVis = new ScopeVis(ui->glScope); m_atvDemod = (ATVDemod*) rxChannel; //new ATVDemod(m_deviceUISet->m_deviceSourceAPI); m_atvDemod->setMessageQueueToGUI(getInputMessageQueue()); - m_atvDemod->propagateMessageQueueToGUI(); m_atvDemod->setScopeSink(m_scopeVis); m_atvDemod->setTVScreen(ui->screenTV); diff --git a/plugins/channelrx/demodatv/atvdemodreport.cpp b/plugins/channelrx/demodatv/atvdemodreport.cpp deleted file mode 100644 index bbb9d7ebb..000000000 --- a/plugins/channelrx/demodatv/atvdemodreport.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2019 Edouard Griffiths, F4EXB // -// // -// 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 . // -/////////////////////////////////////////////////////////////////////////////////// - -#include "atvdemodreport.h" - -MESSAGE_CLASS_DEFINITION(ATVDemodReport::MsgReportEffectiveSampleRate, Message) - -ATVDemodReport::ATVDemodReport() -{ } - -ATVDemodReport::~ATVDemodReport() -{ } \ No newline at end of file diff --git a/plugins/channelrx/demodatv/atvdemodreport.h b/plugins/channelrx/demodatv/atvdemodreport.h deleted file mode 100644 index 54a2b9301..000000000 --- a/plugins/channelrx/demodatv/atvdemodreport.h +++ /dev/null @@ -1,57 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2019 Edouard Griffiths, F4EXB // -// // -// 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 . // -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDE_ATVDEMODREPORT_H -#define INCLUDE_ATVDEMODREPORT_H - -#include - -#include "util/message.h" - -class ATVDemodReport : public QObject -{ - Q_OBJECT -public: - class MsgReportEffectiveSampleRate : public Message - { - MESSAGE_CLASS_DECLARATION - - public: - int getSampleRate() const { return m_sampleRate; } - int getNbPointsPerLine() const { return m_nbPointsPerLine; } - - static MsgReportEffectiveSampleRate* create(int sampleRate, int nbPointsPerLine) - { - return new MsgReportEffectiveSampleRate(sampleRate, nbPointsPerLine); - } - - protected: - int m_sampleRate; - int m_nbPointsPerLine; - - MsgReportEffectiveSampleRate(int sampleRate, int nbPointsPerLine) : - Message(), - m_sampleRate(sampleRate), - m_nbPointsPerLine(nbPointsPerLine) - { } - }; - - ATVDemodReport(); - ~ATVDemodReport(); -}; - -#endif // INCLUDE_ATVDEMODREPORT_H diff --git a/plugins/channelrx/demodatv/atvdemodsink.cpp b/plugins/channelrx/demodatv/atvdemodsink.cpp index 67a11a5bc..8ff8c25a7 100644 --- a/plugins/channelrx/demodatv/atvdemodsink.cpp +++ b/plugins/channelrx/demodatv/atvdemodsink.cpp @@ -60,8 +60,7 @@ ATVDemodSink::ATVDemodSink() : m_interpolatorDistanceRemain(0.0f), m_DSBFilter(nullptr), m_DSBFilterBuffer(nullptr), - m_DSBFilterBufferIndex(0), - m_messageQueueToGUI(nullptr) + m_DSBFilterBufferIndex(0) { qDebug("ATVDemodSink::ATVDemodSink"); //*************** ATV PARAMETERS *************** diff --git a/plugins/channelrx/demodatv/atvdemodsink.h b/plugins/channelrx/demodatv/atvdemodsink.h index 9cd9131f6..4c039bf85 100644 --- a/plugins/channelrx/demodatv/atvdemodsink.h +++ b/plugins/channelrx/demodatv/atvdemodsink.h @@ -47,7 +47,6 @@ public: void setTVScreen(TVScreen *tvScreen) { m_registeredTVScreen = tvScreen; } //!< set by the GUI double getMagSq() const { return m_objMagSqAverage; } //!< Beware this is scaled to 2^30 bool getBFOLocked(); - void setMessageQueueToGUI(MessageQueue *messageQueue) { m_messageQueueToGUI = messageQueue; } void setVideoTabIndex(int videoTabIndex) { m_videoTabIndex = videoTabIndex; } void applyChannelSettings(int channelSampleRate, int channelFrequencyOffset, bool force = false); @@ -181,9 +180,6 @@ private: //QElapsedTimer m_objTimer; - MessageQueue *m_messageQueueToGUI; - - MessageQueue *getMessageQueueToGUI() { return m_messageQueueToGUI; } void demod(Complex& c); void applyStandard(int sampleRate, const ATVDemodSettings& settings, float lineDuration);