mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
New scope: ensure only a trace length of samples is processed at a time
This commit is contained in:
parent
66b584d264
commit
f2b04539cf
@ -144,6 +144,25 @@ void ScopeVisNG::feed(const SampleVector::const_iterator& cbegin, const SampleVe
|
||||
|
||||
SampleVector::const_iterator begin(cbegin);
|
||||
|
||||
while (begin < end)
|
||||
{
|
||||
if (begin + m_traceSize > end)
|
||||
{
|
||||
processTrace(begin, end);
|
||||
begin = end;
|
||||
}
|
||||
else
|
||||
{
|
||||
processTrace(begin, begin + m_traceSize);
|
||||
begin += m_traceSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ScopeVisNG::processTrace(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end)
|
||||
{
|
||||
SampleVector::const_iterator begin(cbegin);
|
||||
|
||||
// memory storage
|
||||
|
||||
m_traceDiscreteMemory.current().write(cbegin, end);
|
||||
@ -215,7 +234,7 @@ void ScopeVisNG::feed(const SampleVector::const_iterator& cbegin, const SampleVe
|
||||
|
||||
if (remainder > 0)
|
||||
{
|
||||
feed(nbegin, nend, positiveOnly);
|
||||
processTrace(nbegin, nend);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -777,6 +777,11 @@ private:
|
||||
*/
|
||||
bool nextTrigger(); //!< Returns true if not final
|
||||
|
||||
/**
|
||||
* Process a sample trace which length is at most the trace length (m_traceSize)
|
||||
*/
|
||||
void processTrace(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end);
|
||||
|
||||
/**
|
||||
* Process traces from complex trace memory buffer.
|
||||
* - if finished it returns the number of unprocessed samples left in the buffer
|
||||
|
Loading…
Reference in New Issue
Block a user