mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-29 13:32:26 -04:00
ScopeVis: added missing mutex locks in message handling. May fix #955
This commit is contained in:
parent
3a3dc0d8c0
commit
785ff0ed12
@ -64,6 +64,7 @@ ScopeVis::ScopeVis() :
|
|||||||
m_traceDiscreteMemory(GLScopeSettings::m_nbTraceMemories),
|
m_traceDiscreteMemory(GLScopeSettings::m_nbTraceMemories),
|
||||||
m_freeRun(true),
|
m_freeRun(true),
|
||||||
m_maxTraceDelay(0),
|
m_maxTraceDelay(0),
|
||||||
|
m_mutex(QMutex::Recursive),
|
||||||
m_triggerOneShot(false),
|
m_triggerOneShot(false),
|
||||||
m_triggerWaitForReset(false),
|
m_triggerWaitForReset(false),
|
||||||
m_currentTraceMemoryIndex(0)
|
m_currentTraceMemoryIndex(0)
|
||||||
@ -943,6 +944,7 @@ bool ScopeVis::handleMessage(const Message& message)
|
|||||||
{
|
{
|
||||||
if (DSPSignalNotification::match(message))
|
if (DSPSignalNotification::match(message))
|
||||||
{
|
{
|
||||||
|
QMutexLocker configLocker(&m_mutex);
|
||||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||||
setLiveRate(notif.getSampleRate());
|
setLiveRate(notif.getSampleRate());
|
||||||
qDebug() << "ScopeVis::handleMessage: DSPSignalNotification: m_sampleRate: " << m_sampleRate;
|
qDebug() << "ScopeVis::handleMessage: DSPSignalNotification: m_sampleRate: " << m_sampleRate;
|
||||||
@ -997,6 +999,7 @@ bool ScopeVis::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
else if (MsgScopeVisFocusOnTrigger::match(message))
|
else if (MsgScopeVisFocusOnTrigger::match(message))
|
||||||
{
|
{
|
||||||
|
QMutexLocker configLocker(&m_mutex);
|
||||||
MsgScopeVisFocusOnTrigger& conf = (MsgScopeVisFocusOnTrigger&) message;
|
MsgScopeVisFocusOnTrigger& conf = (MsgScopeVisFocusOnTrigger&) message;
|
||||||
uint32_t triggerIndex = conf.getTriggerIndex();
|
uint32_t triggerIndex = conf.getTriggerIndex();
|
||||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisFocusOnTrigger: " << triggerIndex;
|
qDebug() << "ScopeVis::handleMessage: MsgScopeVisFocusOnTrigger: " << triggerIndex;
|
||||||
@ -1040,6 +1043,7 @@ bool ScopeVis::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
else if (MsgScopeVisFocusOnTrace::match(message))
|
else if (MsgScopeVisFocusOnTrace::match(message))
|
||||||
{
|
{
|
||||||
|
QMutexLocker configLocker(&m_mutex);
|
||||||
MsgScopeVisFocusOnTrace& conf = (MsgScopeVisFocusOnTrace&) message;
|
MsgScopeVisFocusOnTrace& conf = (MsgScopeVisFocusOnTrace&) message;
|
||||||
uint32_t traceIndex = conf.getTraceIndex();
|
uint32_t traceIndex = conf.getTraceIndex();
|
||||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisFocusOnTrace: " << traceIndex;
|
qDebug() << "ScopeVis::handleMessage: MsgScopeVisFocusOnTrace: " << traceIndex;
|
||||||
@ -1048,6 +1052,7 @@ bool ScopeVis::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
else if (MsgScopeVisNGOneShot::match(message))
|
else if (MsgScopeVisNGOneShot::match(message))
|
||||||
{
|
{
|
||||||
|
QMutexLocker configLocker(&m_mutex);
|
||||||
MsgScopeVisNGOneShot& conf = (MsgScopeVisNGOneShot&) message;
|
MsgScopeVisNGOneShot& conf = (MsgScopeVisNGOneShot&) message;
|
||||||
bool oneShot = conf.getOneShot();
|
bool oneShot = conf.getOneShot();
|
||||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGOneShot: oneShot:" << oneShot;
|
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGOneShot: oneShot:" << oneShot;
|
||||||
@ -1061,6 +1066,7 @@ bool ScopeVis::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
else if (MsgScopeVisNGMemoryTrace::match(message))
|
else if (MsgScopeVisNGMemoryTrace::match(message))
|
||||||
{
|
{
|
||||||
|
QMutexLocker configLocker(&m_mutex);
|
||||||
MsgScopeVisNGMemoryTrace& conf = (MsgScopeVisNGMemoryTrace&) message;
|
MsgScopeVisNGMemoryTrace& conf = (MsgScopeVisNGMemoryTrace&) message;
|
||||||
uint32_t memoryIndex = conf.getMemoryIndex();
|
uint32_t memoryIndex = conf.getMemoryIndex();
|
||||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGMemoryTrace: " << memoryIndex;
|
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGMemoryTrace: " << memoryIndex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user