diff --git a/plugins/channelrx/demodatv/atvdemod.cpp b/plugins/channelrx/demodatv/atvdemod.cpp index 2ef760f03..0efda33c6 100644 --- a/plugins/channelrx/demodatv/atvdemod.cpp +++ b/plugins/channelrx/demodatv/atvdemod.cpp @@ -99,7 +99,8 @@ void ATVDemod::configure( float fltVoltLevelSynchroBlack, bool blnHSync, bool blnVSync, - bool blnInvertVideo) + bool blnInvertVideo, + int intVideoTabIndex) { Message* msgCmd = MsgConfigureATVDemod::create( fltLineDurationUs, @@ -110,7 +111,8 @@ void ATVDemod::configure( fltVoltLevelSynchroBlack, blnHSync, blnVSync, - blnInvertVideo); + blnInvertVideo, + intVideoTabIndex); objMessageQueue->push(msgCmd); } @@ -223,7 +225,7 @@ void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto } } - if(m_objScopeSink != 0) + if ((m_objRunning.m_intVideoTabIndex == 1) && (m_objScopeSink != 0)) // do only if scope tab is selected and scope is available { m_objScopeSink->feed(m_objScopeSampleBuffer.begin(), m_objScopeSampleBuffer.end(), false); // m_ssb = positive only } diff --git a/plugins/channelrx/demodatv/atvdemod.h b/plugins/channelrx/demodatv/atvdemod.h index dcb04ccaf..96979d9ff 100644 --- a/plugins/channelrx/demodatv/atvdemod.h +++ b/plugins/channelrx/demodatv/atvdemod.h @@ -66,6 +66,7 @@ public: bool m_blnHSync; bool m_blnVSync; bool m_blnInvertVideo; + int m_intVideoTabIndex; ATVConfig() : m_intSampleRate(0), @@ -77,7 +78,8 @@ public: m_fltVoltLevelSynchroBlack(1.0f), m_blnHSync(false), m_blnVSync(false), - m_blnInvertVideo(false) + m_blnInvertVideo(false), + m_intVideoTabIndex(0) { } }; @@ -142,7 +144,8 @@ public: float fltVoltLevelSynchroBlack, bool blnHSync, bool blnVSync, - bool blnInvertVideo); + bool blnInvertVideo, + int intVideoTabIndex); void configureRF(MessageQueue* objMessageQueue, ATVModulation enmModulation, @@ -188,7 +191,8 @@ private: float fltVoltLevelSynchroBlack, bool blnHSync, bool blnVSync, - bool blnInvertVideo) + bool blnInvertVideo, + int intVideoTabIndex) { return new MsgConfigureATVDemod( fltLineDurationUs, @@ -199,7 +203,8 @@ private: fltVoltLevelSynchroBlack, blnHSync, blnVSync, - blnInvertVideo); + blnInvertVideo, + intVideoTabIndex); } ATVConfig m_objMsgConfig; @@ -214,7 +219,8 @@ private: float fltVoltLevelSynchroBlack, bool blnHSync, bool blnVSync, - bool blnInvertVideo) : + bool blnInvertVideo, + int intVideoTabIndex) : Message() { m_objMsgConfig.m_fltVoltLevelSynchroBlack = fltVoltLevelSynchroBlack; @@ -226,6 +232,7 @@ private: m_objMsgConfig.m_blnHSync = blnHSync; m_objMsgConfig.m_blnVSync = blnVSync; m_objMsgConfig.m_blnInvertVideo = blnInvertVideo; + m_objMsgConfig.m_intVideoTabIndex = intVideoTabIndex; } }; diff --git a/plugins/channelrx/demodatv/atvdemodgui.cpp b/plugins/channelrx/demodatv/atvdemodgui.cpp index 86a6187d9..b8e725136 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.cpp +++ b/plugins/channelrx/demodatv/atvdemodgui.cpp @@ -370,7 +370,8 @@ void ATVDemodGUI::applySettings() ui->blackLevel->value() / 1000.0f, ui->hSync->isChecked(), ui->vSync->isChecked(), - ui->invertVideo->isChecked()); + ui->invertVideo->isChecked(), + ui->screenTabWidget->currentIndex()); qDebug() << "ATVDemodGUI::applySettings:" << " m_objChannelizer.inputSampleRate: " << m_objChannelizer->getInputSampleRate() @@ -617,6 +618,11 @@ void ATVDemodGUI::on_fmDeviation_valueChanged(int value) applyRFSettings(); } +void ATVDemodGUI::on_screenTabWidget_currentChanged(int index) +{ + applySettings(); +} + void ATVDemodGUI::lineTimeUpdate() { float nominalLineTime = getNominalLineTime(ui->nbLines->currentIndex(), ui->fps->currentIndex()); diff --git a/plugins/channelrx/demodatv/atvdemodgui.h b/plugins/channelrx/demodatv/atvdemodgui.h index c1ab351d6..c174d6b2f 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.h +++ b/plugins/channelrx/demodatv/atvdemodgui.h @@ -84,6 +84,7 @@ private slots: void on_deltaFrequencyMinus_toggled(bool minus); void on_bfo_valueChanged(int value); void on_fmDeviation_valueChanged(int value); + void on_screenTabWidget_currentChanged(int index); private: Ui::ATVDemodGUI* ui;