mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 17:58:43 -05:00
New scope: remove previous commit
This commit is contained in:
parent
fa47e7064f
commit
0672121044
@ -10,6 +10,7 @@ add_subdirectory(udpsrc)
|
||||
add_subdirectory(demodwfm)
|
||||
add_subdirectory(chanalyzer)
|
||||
add_subdirectory(chanalyzerng)
|
||||
add_subdirectory(demodatv)
|
||||
|
||||
if(LIBDSDCC_FOUND AND LIBMBE_FOUND)
|
||||
add_subdirectory(demoddsd)
|
||||
|
@ -491,10 +491,6 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
if (triggerIndex < m_triggerConditions.size())
|
||||
{
|
||||
m_triggerConditions[triggerIndex].setData(conf.getTriggerData());
|
||||
|
||||
if (triggerIndex == m_focusedTriggerIndex) {
|
||||
computeTriggerLevelsOnDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -516,7 +512,6 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
m_traces.addTrace(conf.getTraceData(), m_traceSize);
|
||||
initTraceBuffers();
|
||||
updateMaxTraceDelay();
|
||||
computeTriggerLevelsOnDisplay();
|
||||
m_glScope->updateDisplay();
|
||||
return true;
|
||||
}
|
||||
@ -526,7 +521,6 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
bool doComputeTriggerLevelsOnDisplay = m_traces.isVerticalDisplayChange(conf.getTraceData(), conf.getTraceIndex());
|
||||
m_traces.changeTrace(conf.getTraceData(), conf.getTraceIndex());
|
||||
updateMaxTraceDelay();
|
||||
if (doComputeTriggerLevelsOnDisplay) computeTriggerLevelsOnDisplay();
|
||||
m_glScope->updateDisplay();
|
||||
return true;
|
||||
}
|
||||
@ -535,7 +529,6 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
MsgScopeVisNGRemoveTrace& conf = (MsgScopeVisNGRemoveTrace&) message;
|
||||
m_traces.removeTrace(conf.getTraceIndex());
|
||||
updateMaxTraceDelay();
|
||||
computeTriggerLevelsOnDisplay();
|
||||
m_glScope->updateDisplay();
|
||||
return true;
|
||||
}
|
||||
@ -579,35 +572,3 @@ void ScopeVisNG::initTraceBuffers()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ScopeVisNG::computeTriggerLevelsOnDisplay()
|
||||
{
|
||||
const TriggerCondition& focusedTriggerCondition = m_triggerConditions[m_focusedTriggerIndex];
|
||||
std::vector<TraceData>::const_iterator itData = m_traces.m_tracesData.begin();
|
||||
float v;
|
||||
|
||||
for (; itData != m_traces.m_tracesData.end(); ++itData)
|
||||
{
|
||||
if (focusedTriggerCondition.m_projector->getProjectionType() == itData->m_projectionType)
|
||||
{
|
||||
if (itData->m_projectionType == ProjectionMagLin) {
|
||||
v = (focusedTriggerCondition.m_triggerData.m_triggerLevel - itData->m_ofs)*itData->m_amp - 1.0f;
|
||||
} else if (itData->m_projectionType == ProjectionMagDB) {
|
||||
float p = focusedTriggerCondition.m_triggerData.m_triggerLevel - (100.0f * itData->m_ofs);
|
||||
v = ((p/50.0f) + 2.0f)*itData->m_amp - 1.0f;
|
||||
} else {
|
||||
v = (focusedTriggerCondition.m_triggerData.m_triggerLevel - itData->m_ofs) * itData->m_amp;
|
||||
}
|
||||
|
||||
if(v > 1.0f) {
|
||||
v = 1.0f;
|
||||
} else if (v < -1.0f) {
|
||||
v = -1.0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
v = 2.0f; // clamp high
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -837,7 +837,6 @@ private:
|
||||
* - every time a trace data changes: projection type, amp, offset
|
||||
* - every time a trace data is added or removed
|
||||
*/
|
||||
void computeTriggerLevelsOnDisplay();
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user