From 6649da7f99a0d35ee2de468e548f54bcdb63ac73 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 8 Oct 2020 07:51:31 +0200 Subject: [PATCH] Scope: fixed one shot trigger: Fixes #650 --- sdrgui/dsp/scopevis.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sdrgui/dsp/scopevis.cpp b/sdrgui/dsp/scopevis.cpp index 9bfffbd71..a2ffa1856 100644 --- a/sdrgui/dsp/scopevis.cpp +++ b/sdrgui/dsp/scopevis.cpp @@ -224,6 +224,13 @@ void ScopeVis::feed(const SampleVector::const_iterator& cbegin, const SampleVect return; } + if (m_triggerWaitForReset) + { + m_triggerLocation = 0; + m_mutex.unlock(); + return; + } + if (m_freeRun) { m_triggerLocation = end - cbegin; } @@ -233,9 +240,6 @@ void ScopeVis::feed(const SampleVector::const_iterator& cbegin, const SampleVect else if (m_triggerState == TriggerUntriggered) { m_triggerLocation = 0; } - else if (m_triggerWaitForReset) { - m_triggerLocation = 0; - } else { m_triggerLocation = end - cbegin; } @@ -858,11 +862,15 @@ bool ScopeVis::handleMessage(const Message& message) } else if (MsgScopeVisNGOneShot::match(message)) { - qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGOneShot"; MsgScopeVisNGOneShot& conf = (MsgScopeVisNGOneShot&) message; bool oneShot = conf.getOneShot(); + qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGOneShot: oneShot:" << oneShot; m_triggerOneShot = oneShot; - if (m_triggerWaitForReset && !oneShot) m_triggerWaitForReset = false; + + if (m_triggerWaitForReset && !oneShot) { + m_triggerWaitForReset = false; + } + return true; } else if (MsgScopeVisNGMemoryTrace::match(message))