kopia lustrzana https://github.com/f4exb/sdrangel
Scope: rationalize trigger location computation
rodzic
f1eeed38da
commit
e2440afd87
|
@ -253,9 +253,8 @@ void ScopeVis::feed(const SampleVector::const_iterator& cbegin, const SampleVect
|
|||
{
|
||||
triggerPointToEnd = -1;
|
||||
processTrace(begin, end, triggerPointToEnd); // use all buffer
|
||||
if (triggerPointToEnd >= 0) {
|
||||
m_triggerLocation = triggerPointToEnd;
|
||||
}
|
||||
m_triggerLocation = triggerPointToEnd < 0 ? 0 : triggerPointToEnd; // trim negative values
|
||||
m_triggerLocation = m_triggerLocation > end - begin ? end - begin : m_triggerLocation; // trim past begin values
|
||||
|
||||
begin = end; // effectively breaks out the loop
|
||||
}
|
||||
|
@ -263,10 +262,10 @@ void ScopeVis::feed(const SampleVector::const_iterator& cbegin, const SampleVect
|
|||
{
|
||||
triggerPointToEnd = -1;
|
||||
processTrace(begin, begin + m_traceSize, triggerPointToEnd); // use part of buffer to fit trace size
|
||||
if (triggerPointToEnd >= 0) {
|
||||
//m_triggerPoint = begin + m_traceSize - triggerPointToEnd;
|
||||
m_triggerLocation = triggerPointToEnd - m_traceSize;
|
||||
}
|
||||
//m_triggerPoint = begin + m_traceSize - triggerPointToEnd;
|
||||
m_triggerLocation = end - begin + m_traceSize - triggerPointToEnd; // should always refer to end iterator
|
||||
m_triggerLocation = m_triggerLocation < 0 ? 0 : m_triggerLocation; // trim negative values
|
||||
m_triggerLocation = m_triggerLocation > end - begin ? end - begin : m_triggerLocation; // trim past begin values
|
||||
|
||||
begin += m_traceSize;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ void SpectrumScopeComboVis::feed(const SampleVector::const_iterator& begin, cons
|
|||
//SampleVector::const_iterator triggerPoint = m_scopeVis->getTriggerPoint();
|
||||
//m_spectrumVis->feedTriggered(triggerPoint, end, positiveOnly);
|
||||
int triggerPointLocation = m_scopeVis->getTriggerLocation();
|
||||
if ((triggerPointLocation >= 0) && (triggerPointLocation < end - begin)) {
|
||||
if ((triggerPointLocation >= 0) && (triggerPointLocation <= end - begin)) {
|
||||
m_spectrumVis->feedTriggered(end - triggerPointLocation, end, positiveOnly);
|
||||
} else {
|
||||
m_spectrumVis->feedTriggered(begin, end, positiveOnly);
|
||||
|
|
Ładowanie…
Reference in New Issue