1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-04 16:01:14 -05:00

Scope: fixed one shot trigger: Fixes #650

This commit is contained in:
f4exb 2020-10-08 07:51:31 +02:00
parent 40bd300baf
commit 6649da7f99

View File

@ -224,6 +224,13 @@ void ScopeVis::feed(const SampleVector::const_iterator& cbegin, const SampleVect
return; return;
} }
if (m_triggerWaitForReset)
{
m_triggerLocation = 0;
m_mutex.unlock();
return;
}
if (m_freeRun) { if (m_freeRun) {
m_triggerLocation = end - cbegin; m_triggerLocation = end - cbegin;
} }
@ -233,9 +240,6 @@ void ScopeVis::feed(const SampleVector::const_iterator& cbegin, const SampleVect
else if (m_triggerState == TriggerUntriggered) { else if (m_triggerState == TriggerUntriggered) {
m_triggerLocation = 0; m_triggerLocation = 0;
} }
else if (m_triggerWaitForReset) {
m_triggerLocation = 0;
}
else { else {
m_triggerLocation = end - cbegin; m_triggerLocation = end - cbegin;
} }
@ -858,11 +862,15 @@ bool ScopeVis::handleMessage(const Message& message)
} }
else if (MsgScopeVisNGOneShot::match(message)) else if (MsgScopeVisNGOneShot::match(message))
{ {
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGOneShot";
MsgScopeVisNGOneShot& conf = (MsgScopeVisNGOneShot&) message; MsgScopeVisNGOneShot& conf = (MsgScopeVisNGOneShot&) message;
bool oneShot = conf.getOneShot(); bool oneShot = conf.getOneShot();
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGOneShot: oneShot:" << oneShot;
m_triggerOneShot = oneShot; m_triggerOneShot = oneShot;
if (m_triggerWaitForReset && !oneShot) m_triggerWaitForReset = false;
if (m_triggerWaitForReset && !oneShot) {
m_triggerWaitForReset = false;
}
return true; return true;
} }
else if (MsgScopeVisNGMemoryTrace::match(message)) else if (MsgScopeVisNGMemoryTrace::match(message))