diff --git a/plugins/channelrx/radioclock/radioclock.cpp b/plugins/channelrx/radioclock/radioclock.cpp index c4b458560..20786da93 100644 --- a/plugins/channelrx/radioclock/radioclock.cpp +++ b/plugins/channelrx/radioclock/radioclock.cpp @@ -55,7 +55,6 @@ RadioClock::RadioClock(DeviceAPI *deviceAPI) : setObjectName(m_channelId); m_basebandSink = new RadioClockBaseband(this); - m_basebandSink->setScopeSink(&m_scopeSink); m_basebandSink->setMessageQueueToChannel(getInputMessageQueue()); m_basebandSink->setChannel(this); m_basebandSink->moveToThread(&m_thread); @@ -170,6 +169,11 @@ bool RadioClock::handleMessage(const Message& cmd) } } +ScopeVis *RadioClock::getScopeSink() +{ + return m_basebandSink->getScopeSink(); +} + void RadioClock::applySettings(const RadioClockSettings& settings, bool force) { qDebug() << "RadioClock::applySettings:" diff --git a/plugins/channelrx/radioclock/radioclock.h b/plugins/channelrx/radioclock/radioclock.h index fc33b4ecd..051f64936 100644 --- a/plugins/channelrx/radioclock/radioclock.h +++ b/plugins/channelrx/radioclock/radioclock.h @@ -26,7 +26,6 @@ #include #include "dsp/basebandsamplesink.h" -#include "dsp/scopevis.h" #include "channel/channelapi.h" #include "util/message.h" @@ -158,7 +157,7 @@ public: const QStringList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings& response); - ScopeVis *getScopeSink() { return &m_scopeSink; } + ScopeVis *getScopeSink(); double getMagSq() const { return m_basebandSink->getMagSq(); } void getMagSqLevels(double& avg, double& peak, int& nbSamples) { @@ -178,7 +177,6 @@ private: int m_basebandSampleRate; //!< stored from device message used when starting baseband sink qint64 m_centerFrequency; QDateTime m_dateTime; //!< Received data and time - ScopeVis m_scopeSink; QNetworkAccessManager *m_networkManager; QNetworkRequest m_networkRequest; diff --git a/plugins/channelrx/radioclock/radioclockbaseband.cpp b/plugins/channelrx/radioclock/radioclockbaseband.cpp index 35d89155e..e73cf3e04 100644 --- a/plugins/channelrx/radioclock/radioclockbaseband.cpp +++ b/plugins/channelrx/radioclock/radioclockbaseband.cpp @@ -34,6 +34,7 @@ RadioClockBaseband::RadioClockBaseband(RadioClock *radioClock) : { qDebug("RadioClockBaseband::RadioClockBaseband"); + m_sink.setScopeSink(&m_scopeSink); m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(48000)); m_channelizer = new DownChannelizer(&m_sink); } diff --git a/plugins/channelrx/radioclock/radioclockbaseband.h b/plugins/channelrx/radioclock/radioclockbaseband.h index 73431d365..e728e25d4 100644 --- a/plugins/channelrx/radioclock/radioclockbaseband.h +++ b/plugins/channelrx/radioclock/radioclockbaseband.h @@ -23,6 +23,7 @@ #include #include "dsp/samplesinkfifo.h" +#include "dsp/scopevis.h" #include "util/message.h" #include "util/messagequeue.h" @@ -72,7 +73,7 @@ public: } void setMessageQueueToChannel(MessageQueue *messageQueue) { m_sink.setMessageQueueToChannel(messageQueue); } void setBasebandSampleRate(int sampleRate); - void setScopeSink(ScopeVis *scopeSink) { m_sink.setScopeSink(scopeSink); } + ScopeVis *getScopeSink() { return &m_scopeSink; } void setChannel(ChannelAPI *channel); double getMagSq() const { return m_sink.getMagSq(); } bool isRunning() const { return m_running; } @@ -83,6 +84,7 @@ private: RadioClockSink m_sink; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication RadioClockSettings m_settings; + ScopeVis m_scopeSink; bool m_running; QMutex m_mutex;