New scope: review trace outer process

This commit is contained in:
f4exb 2017-02-09 00:04:19 +01:00
parent e3b933350c
commit 93143b0cbd
1 changed files with 11 additions and 12 deletions

View File

@ -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()