From 93143b0cbd8e4a4b948c8f404ab32072528e5b4c Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 9 Feb 2017 00:04:19 +0100 Subject: [PATCH] New scope: review trace outer process --- sdrbase/dsp/scopevisng.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sdrbase/dsp/scopevisng.cpp b/sdrbase/dsp/scopevisng.cpp index b8953e3c3..ec452c64c 100644 --- a/sdrbase/dsp/scopevisng.cpp +++ b/sdrbase/dsp/scopevisng.cpp @@ -202,14 +202,14 @@ void ScopeVisNG::processTrace(const SampleVector::const_iterator& cbegin, const } } - int remainder = -1; - int count = end - begin; // number of samples in traceback buffer past the current point - SampleVector::iterator nend = m_traceDiscreteMemory.current().current(); - SampleVector::iterator nbegin = nend - count; - // trace process if (m_triggerState == TriggerTriggered) { + int remainder = -1; + int count = end - begin; // number of samples in traceback buffer past the current point + SampleVector::iterator nend = m_traceDiscreteMemory.current().current(); + SampleVector::iterator nbegin = nend - count; + // trace back if ((m_traceStart) && (m_preTriggerDelay + m_maxTraceDelay > 0)) @@ -231,15 +231,14 @@ void ScopeVisNG::processTrace(const SampleVector::const_iterator& cbegin, const m_traceDiscreteMemory.store(); // next memory trace m_traceCompleteCount = 0; m_triggerState = TriggerUntriggered; + + // process remainder recursively + if (remainder != 0) + { + processTrace(nbegin, nend); + } } } - - // process remainder recursively - - if (remainder > 0) - { - processTrace(nbegin, nend); - } } bool ScopeVisNG::nextTrigger()