From 3e9db6af099223e76d3642165b08540cd19430be Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 25 Feb 2017 13:14:29 +0100 Subject: [PATCH] ATV Demod: make sure channel marker is correctly updated when channel sample rate changes --- plugins/channelrx/demodatv/atvdemod.cpp | 2 +- plugins/channelrx/demodatv/atvdemodgui.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/channelrx/demodatv/atvdemod.cpp b/plugins/channelrx/demodatv/atvdemod.cpp index 8c5791323..d75ee19a1 100644 --- a/plugins/channelrx/demodatv/atvdemod.cpp +++ b/plugins/channelrx/demodatv/atvdemod.cpp @@ -151,7 +151,7 @@ void ATVDemod::InitATVParameters(int intMsps, int intLineDurationUs, int intTopD m_objRunning.m_blnHSync = blnHSync; m_objRunning.m_blnVSync = blnVSync; - qDebug() << "ATV Settings " + qDebug() << "ATVDemod::InitATVParameters:" << " - Msps: " << intMsps << " - Line us: " << intLineDurationUs << " - Top us: " << intTopDurationUs diff --git a/plugins/channelrx/demodatv/atvdemodgui.cpp b/plugins/channelrx/demodatv/atvdemodgui.cpp index 15a3d3394..683f15a7a 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.cpp +++ b/plugins/channelrx/demodatv/atvdemodgui.cpp @@ -180,6 +180,7 @@ void ATVDemodGUI::viewChanged() void ATVDemodGUI::channelSampleRateChanged() { + qDebug("ATVDemodGUI::channelSampleRateChanged"); applySettings(); } @@ -299,7 +300,12 @@ void ATVDemodGUI::applySettings() enmSelectedModulation, ui->hSync->isChecked(), ui->vSync->isChecked()); - m_objChannelMarker.setBandwidth(m_objATVDemod->GetSampleRate()); + qDebug() << "ATVDemodGUI::applySettings:" + << " m_objChannelizer.inputSampleRate: " << m_objChannelizer->getInputSampleRate() + << " m_objATVDemod.sampleRate: " << m_objATVDemod->GetSampleRate(); + + //m_objChannelMarker.setBandwidth(m_objATVDemod->GetSampleRate()); it is unreliable at this moment + m_objChannelMarker.setBandwidth(m_objChannelizer->getInputSampleRate()); } }