diff --git a/sdrbase/dsp/scopevisng.cpp b/sdrbase/dsp/scopevisng.cpp index 421e81fa9..414f1069d 100644 --- a/sdrbase/dsp/scopevisng.cpp +++ b/sdrbase/dsp/scopevisng.cpp @@ -192,7 +192,7 @@ void ScopeVisNG::feed(const SampleVector::const_iterator& cbegin, const SampleVe if (triggerCondition.m_triggerData.m_triggerDelay > 0) // there is a delay => initialize the delay { triggerCondition.m_triggerDelayCount = triggerCondition.m_triggerData.m_triggerDelay; - m_triggerState == TriggerDelay; + m_triggerState = TriggerDelay; } else { @@ -297,7 +297,6 @@ bool ScopeVisNG::nextTrigger() return false; // final } -// TODO: should handle previous and live traces the same way from a stored buffer int ScopeVisNG::processTraces(int beginPointDelta, int endPointDelta, TraceBackBuffer& traceBuffer, bool traceStart) { SampleVector::iterator begin = traceBuffer.current() - beginPointDelta; diff --git a/sdrbase/dsp/scopevisng.h b/sdrbase/dsp/scopevisng.h index 24d275e6c..2d9be90b5 100644 --- a/sdrbase/dsp/scopevisng.h +++ b/sdrbase/dsp/scopevisng.h @@ -555,7 +555,18 @@ private: int m_sampleRate; TraceBackDiscreteMemory m_traceDiscreteMemory; //!< Complex trace memory for triggered states TODO: vectorize when more than on input is allowed - bool nextTrigger(); + /** + * Moves on to the next trigger if any or increments trigger count if in repeat mode + * - If not final it returns true + * - If final i.e. signal is actually triggerd it returns false + */ + bool nextTrigger(); //!< Returns true if not final + + /** + * Process traces from complex trace memory buffer. + * - if finished it returns the number of unprocessed samples left in the buffer + * - if not finished it returns -1 + */ int processTraces(int beginPointDelta, int endPointDelta, TraceBackBuffer& traceBuffer, bool traceStart = false); };