From 7ab87d594a029f5c41c273e13a0b93ce31780bda Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 27 Oct 2018 07:32:14 +0200 Subject: [PATCH] Scope: update trace continuously for sweep times of one second or more --- plugins/channelrx/chanalyzer/readme.md | 4 +++- sdrgui/dsp/scopevis.cpp | 11 +++++++++-- sdrgui/dsp/scopevis.h | 1 - 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/channelrx/chanalyzer/readme.md b/plugins/channelrx/chanalyzer/readme.md index 7eaa726de..8fd9755a0 100644 --- a/plugins/channelrx/chanalyzer/readme.md +++ b/plugins/channelrx/chanalyzer/readme.md @@ -32,7 +32,9 @@ The interface is essentially divided in the following sections 4. Scope trace control 5. Scope trigger control -Note: the spectrum view (Channel spectrum) is not presented here. +Note 1: the scope trace is updated continuously for sweep times of 1 second or more else the display is refreshed only when the trace finishes. + +Note 2: the spectrum view (Channel spectrum) is not presented here.

C. Channel controls

diff --git a/sdrgui/dsp/scopevis.cpp b/sdrgui/dsp/scopevis.cpp index 115b0f03a..44a9a3834 100644 --- a/sdrgui/dsp/scopevis.cpp +++ b/sdrgui/dsp/scopevis.cpp @@ -595,10 +595,17 @@ int ScopeVis::processTraces(const SampleVector::const_iterator& cbegin, const Sa m_nbSamples--; } + float traceTime = ((float) m_traceSize) / m_sampleRate; + + if (traceTime >= 1.0f) { // display continuously if trace time is 1 second or more + m_glScope->newTraces(&m_traces.m_traces[m_traces.currentBufferIndex()]); + } + if (m_nbSamples == 0) // finished { - //sqDebug("ScopeVis::processTraces: m_traceCount: %d", m_traces.m_tracesControl.begin()->m_traceCount[m_traces.currentBufferIndex()]); - m_glScope->newTraces(&m_traces.m_traces[m_traces.currentBufferIndex()]); + if (traceTime < 1.0f) { // display only at trace end if trace time is less than 1 second + m_glScope->newTraces(&m_traces.m_traces[m_traces.currentBufferIndex()]); + } m_traces.switchBuffer(); return end - begin; // return remainder count } diff --git a/sdrgui/dsp/scopevis.h b/sdrgui/dsp/scopevis.h index b76f8fb62..9eb5dd963 100644 --- a/sdrgui/dsp/scopevis.h +++ b/sdrgui/dsp/scopevis.h @@ -562,7 +562,6 @@ private: TriggerUntriggered, //!< Trigger is not kicked off yet (or trigger list is empty) TriggerTriggered, //!< Trigger has been kicked off TriggerDelay, //!< Trigger conditions have been kicked off but it is waiting for delay before final kick off - TriggerNewConfig, //!< Special condition when a new configuration has been received }; struct TriggerCondition