mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Renamed ScopeVisNG to ScopeVis
This commit is contained in:
parent
4a733cae51
commit
aa6f2e9f2f
@ -386,7 +386,7 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *device
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_spectrumVis = new SpectrumVis(SDR_RX_SCALEF, ui->glSpectrum);
|
||||
m_scopeVis = new ScopeVisNG(ui->glScope);
|
||||
m_scopeVis = new ScopeVis(ui->glScope);
|
||||
m_spectrumScopeComboVis = new SpectrumScopeComboVis(m_spectrumVis, m_scopeVis);
|
||||
m_channelAnalyzer = (ChannelAnalyzer*) rxChannel; //new ChannelAnalyzer(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_channelAnalyzer->setSampleSink(m_spectrumScopeComboVis);
|
||||
|
@ -32,7 +32,7 @@ class BasebandSampleSink;
|
||||
class ChannelAnalyzer;
|
||||
class SpectrumScopeComboVis;
|
||||
class SpectrumVis;
|
||||
class ScopeVisNG;
|
||||
class ScopeVis;
|
||||
|
||||
namespace Ui {
|
||||
class ChannelAnalyzerGUI;
|
||||
@ -73,7 +73,7 @@ private:
|
||||
ChannelAnalyzer* m_channelAnalyzer;
|
||||
SpectrumScopeComboVis* m_spectrumScopeComboVis;
|
||||
SpectrumVis* m_spectrumVis;
|
||||
ScopeVisNG* m_scopeVis;
|
||||
ScopeVis* m_scopeVis;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
explicit ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
|
@ -282,7 +282,7 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
|
||||
m_scopeVis = new ScopeVisNG(ui->glScope);
|
||||
m_scopeVis = new ScopeVis(ui->glScope);
|
||||
m_atvDemod = (ATVDemod*) rxChannel; //new ATVDemod(m_deviceUISet->m_deviceSourceAPI);
|
||||
m_atvDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
m_atvDemod->setScopeSink(m_scopeVis);
|
||||
@ -313,14 +313,14 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base
|
||||
resetToDefaults(); // does applySettings()
|
||||
|
||||
ui->scopeGUI->setPreTrigger(1);
|
||||
ScopeVisNG::TraceData traceData;
|
||||
ScopeVis::TraceData traceData;
|
||||
traceData.m_amp = 2.0; // amplification factor
|
||||
traceData.m_ampIndex = 1; // this is second step
|
||||
traceData.m_ofs = 0.5; // direct offset
|
||||
traceData.m_ofsCoarse = 50; // this is 50 coarse steps
|
||||
ui->scopeGUI->changeTrace(0, traceData);
|
||||
ui->scopeGUI->focusOnTrace(0); // re-focus to take changes into account in the GUI
|
||||
ScopeVisNG::TriggerData triggerData;
|
||||
ScopeVis::TriggerData triggerData;
|
||||
triggerData.m_triggerLevel = 0.1;
|
||||
triggerData.m_triggerLevelCoarse = 10;
|
||||
triggerData.m_triggerPositiveEdge = false;
|
||||
|
@ -28,7 +28,7 @@ class PluginAPI;
|
||||
class DeviceUISet;
|
||||
class BasebandSampleSink;
|
||||
class ATVDemod;
|
||||
class ScopeVisNG;
|
||||
class ScopeVis;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -70,7 +70,7 @@ private:
|
||||
MovingAverageUtil<double, double, 4> m_objMagSqAverage;
|
||||
int m_intTickCount;
|
||||
|
||||
ScopeVisNG* m_scopeVis;
|
||||
ScopeVis* m_scopeVis;
|
||||
|
||||
float m_fltLineTimeMultiplier;
|
||||
float m_fltTopTimeMultiplier;
|
||||
|
@ -22,24 +22,24 @@
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "gui/glscope.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgConfigureScopeVisNG, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGAddTrigger, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGChangeTrigger, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGRemoveTrigger, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGMoveTrigger, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGFocusOnTrigger, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGAddTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGChangeTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGRemoveTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGMoveTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGFocusOnTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGOneShot, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVisNG::MsgScopeVisNGMemoryTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgConfigureScopeVisNG, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGAddTrigger, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGChangeTrigger, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGRemoveTrigger, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGMoveTrigger, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGFocusOnTrigger, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGAddTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGChangeTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGRemoveTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGMoveTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGFocusOnTrace, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGOneShot, Message)
|
||||
MESSAGE_CLASS_DEFINITION(ScopeVis::MsgScopeVisNGMemoryTrace, Message)
|
||||
|
||||
const uint ScopeVisNG::m_traceChunkSize = 4800;
|
||||
const uint ScopeVis::m_traceChunkSize = 4800;
|
||||
|
||||
|
||||
ScopeVisNG::ScopeVisNG(GLScope* glScope) :
|
||||
ScopeVis::ScopeVis(GLScope* glScope) :
|
||||
m_glScope(glScope),
|
||||
m_preTriggerDelay(0),
|
||||
m_currentTriggerIndex(0),
|
||||
@ -59,7 +59,7 @@ ScopeVisNG::ScopeVisNG(GLScope* glScope) :
|
||||
m_triggerWaitForReset(false),
|
||||
m_currentTraceMemoryIndex(0)
|
||||
{
|
||||
setObjectName("ScopeVisNG");
|
||||
setObjectName("ScopeVis");
|
||||
m_traceDiscreteMemory.resize(m_traceChunkSize); // arbitrary
|
||||
m_glScope->setTraces(&m_traces.m_tracesData, &m_traces.m_traces[0]);
|
||||
for (int i = 0; i < (int) Projector::nbProjectionTypes; i++) {
|
||||
@ -67,14 +67,14 @@ ScopeVisNG::ScopeVisNG(GLScope* glScope) :
|
||||
}
|
||||
}
|
||||
|
||||
ScopeVisNG::~ScopeVisNG()
|
||||
ScopeVis::~ScopeVis()
|
||||
{
|
||||
for (std::vector<TriggerCondition*>::iterator it = m_triggerConditions.begin(); it != m_triggerConditions.end(); ++ it) {
|
||||
delete *it;
|
||||
}
|
||||
}
|
||||
|
||||
void ScopeVisNG::setSampleRate(int sampleRate)
|
||||
void ScopeVis::setSampleRate(int sampleRate)
|
||||
{
|
||||
if (sampleRate != m_sampleRate)
|
||||
{
|
||||
@ -83,15 +83,15 @@ void ScopeVisNG::setSampleRate(int sampleRate)
|
||||
}
|
||||
}
|
||||
|
||||
void ScopeVisNG::configure(uint32_t traceSize, uint32_t timeBase, uint32_t timeOfsProMill, uint32_t triggerPre, bool freeRun)
|
||||
void ScopeVis::configure(uint32_t traceSize, uint32_t timeBase, uint32_t timeOfsProMill, uint32_t triggerPre, bool freeRun)
|
||||
{
|
||||
Message* cmd = MsgConfigureScopeVisNG::create(traceSize, timeBase, timeOfsProMill, triggerPre, freeRun);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::addTrace(const TraceData& traceData)
|
||||
void ScopeVis::addTrace(const TraceData& traceData)
|
||||
{
|
||||
qDebug() << "ScopeVisNG::addTrace:"
|
||||
qDebug() << "ScopeVis::addTrace:"
|
||||
<< " m_amp: " << traceData.m_amp
|
||||
<< " m_ofs: " << traceData.m_ofs
|
||||
<< " m_traceDelay: " << traceData.m_traceDelay;
|
||||
@ -99,9 +99,9 @@ void ScopeVisNG::addTrace(const TraceData& traceData)
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::changeTrace(const TraceData& traceData, uint32_t traceIndex)
|
||||
void ScopeVis::changeTrace(const TraceData& traceData, uint32_t traceIndex)
|
||||
{
|
||||
qDebug() << "ScopeVisNG::changeTrace:"
|
||||
qDebug() << "ScopeVis::changeTrace:"
|
||||
<< " trace: " << traceIndex
|
||||
<< " m_amp: " << traceData.m_amp
|
||||
<< " m_ofs: " << traceData.m_ofs
|
||||
@ -110,72 +110,72 @@ void ScopeVisNG::changeTrace(const TraceData& traceData, uint32_t traceIndex)
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::removeTrace(uint32_t traceIndex)
|
||||
void ScopeVis::removeTrace(uint32_t traceIndex)
|
||||
{
|
||||
qDebug() << "ScopeVisNG::removeTrace:"
|
||||
qDebug() << "ScopeVis::removeTrace:"
|
||||
<< " trace: " << traceIndex;
|
||||
Message* cmd = MsgScopeVisNGRemoveTrace::create(traceIndex);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::moveTrace(uint32_t traceIndex, bool upElseDown)
|
||||
void ScopeVis::moveTrace(uint32_t traceIndex, bool upElseDown)
|
||||
{
|
||||
qDebug() << "ScopeVisNG::moveTrace:"
|
||||
qDebug() << "ScopeVis::moveTrace:"
|
||||
<< " trace: " << traceIndex
|
||||
<< " up: " << upElseDown;
|
||||
Message* cmd = MsgScopeVisNGMoveTrace::create(traceIndex, upElseDown);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::focusOnTrace(uint32_t traceIndex)
|
||||
void ScopeVis::focusOnTrace(uint32_t traceIndex)
|
||||
{
|
||||
Message* cmd = MsgScopeVisNGFocusOnTrace::create(traceIndex);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::addTrigger(const TriggerData& triggerData)
|
||||
void ScopeVis::addTrigger(const TriggerData& triggerData)
|
||||
{
|
||||
Message* cmd = MsgScopeVisNGAddTrigger::create(triggerData);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::changeTrigger(const TriggerData& triggerData, uint32_t triggerIndex)
|
||||
void ScopeVis::changeTrigger(const TriggerData& triggerData, uint32_t triggerIndex)
|
||||
{
|
||||
Message* cmd = MsgScopeVisNGChangeTrigger::create(triggerData, triggerIndex);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::removeTrigger(uint32_t triggerIndex)
|
||||
void ScopeVis::removeTrigger(uint32_t triggerIndex)
|
||||
{
|
||||
Message* cmd = MsgScopeVisNGRemoveTrigger::create(triggerIndex);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::moveTrigger(uint32_t triggerIndex, bool upElseDown)
|
||||
void ScopeVis::moveTrigger(uint32_t triggerIndex, bool upElseDown)
|
||||
{
|
||||
Message* cmd = MsgScopeVisNGMoveTrigger::create(triggerIndex, upElseDown);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::focusOnTrigger(uint32_t triggerIndex)
|
||||
void ScopeVis::focusOnTrigger(uint32_t triggerIndex)
|
||||
{
|
||||
Message* cmd = MsgScopeVisNGFocusOnTrigger::create(triggerIndex);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::setOneShot(bool oneShot)
|
||||
void ScopeVis::setOneShot(bool oneShot)
|
||||
{
|
||||
Message* cmd = MsgScopeVisNGOneShot::create(oneShot);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::setMemoryIndex(uint32_t memoryIndex)
|
||||
void ScopeVis::setMemoryIndex(uint32_t memoryIndex)
|
||||
{
|
||||
Message* cmd = MsgScopeVisNGMemoryTrace::create(memoryIndex);
|
||||
getInputMessageQueue()->push(cmd);
|
||||
}
|
||||
|
||||
void ScopeVisNG::feed(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end, bool positiveOnly __attribute__((unused)))
|
||||
void ScopeVis::feed(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end, bool positiveOnly __attribute__((unused)))
|
||||
{
|
||||
if (m_freeRun) {
|
||||
m_triggerPoint = cbegin;
|
||||
@ -228,7 +228,7 @@ void ScopeVisNG::feed(const SampleVector::const_iterator& cbegin, const SampleVe
|
||||
m_mutex.unlock();
|
||||
}
|
||||
|
||||
void ScopeVisNG::processMemoryTrace()
|
||||
void ScopeVis::processMemoryTrace()
|
||||
{
|
||||
if ((m_currentTraceMemoryIndex > 0) && (m_currentTraceMemoryIndex < m_nbTraceMemories))
|
||||
{
|
||||
@ -242,7 +242,7 @@ void ScopeVisNG::processMemoryTrace()
|
||||
}
|
||||
}
|
||||
|
||||
void ScopeVisNG::processTrace(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end, int& triggerPointToEnd)
|
||||
void ScopeVis::processTrace(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end, int& triggerPointToEnd)
|
||||
{
|
||||
SampleVector::const_iterator begin(cbegin);
|
||||
|
||||
@ -393,13 +393,13 @@ void ScopeVisNG::processTrace(const SampleVector::const_iterator& cbegin, const
|
||||
triggerPointToEnd = mTriggerPointToEnd;
|
||||
}
|
||||
|
||||
//qDebug("ScopeVisNG::processTrace: process remainder recursively (%d %d)", mpoint, mTriggerPoint);
|
||||
//qDebug("ScopeVis::processTrace: process remainder recursively (%d %d)", mpoint, mTriggerPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ScopeVisNG::nextTrigger()
|
||||
bool ScopeVis::nextTrigger()
|
||||
{
|
||||
TriggerCondition *triggerCondition = m_triggerConditions[m_currentTriggerIndex]; // current trigger condition
|
||||
|
||||
@ -434,7 +434,7 @@ bool ScopeVisNG::nextTrigger()
|
||||
}
|
||||
}
|
||||
|
||||
int ScopeVisNG::processTraces(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end, bool traceBack)
|
||||
int ScopeVis::processTraces(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end, bool traceBack)
|
||||
{
|
||||
SampleVector::const_iterator begin(cbegin);
|
||||
uint32_t shift = (m_timeOfsProMill / 1000.0) * m_traceSize;
|
||||
@ -559,7 +559,7 @@ int ScopeVisNG::processTraces(const SampleVector::const_iterator& cbegin, const
|
||||
|
||||
if (m_nbSamples == 0) // finished
|
||||
{
|
||||
//sqDebug("ScopeVisNG::processTraces: m_traceCount: %d", m_traces.m_tracesControl.begin()->m_traceCount[m_traces.currentBufferIndex()]);
|
||||
//sqDebug("ScopeVis::processTraces: m_traceCount: %d", m_traces.m_tracesControl.begin()->m_traceCount[m_traces.currentBufferIndex()]);
|
||||
m_glScope->newTraces(&m_traces.m_traces[m_traces.currentBufferIndex()]);
|
||||
m_traces.switchBuffer();
|
||||
return end - begin; // return remainder count
|
||||
@ -570,21 +570,21 @@ int ScopeVisNG::processTraces(const SampleVector::const_iterator& cbegin, const
|
||||
}
|
||||
}
|
||||
|
||||
void ScopeVisNG::start()
|
||||
void ScopeVis::start()
|
||||
{
|
||||
}
|
||||
|
||||
void ScopeVisNG::stop()
|
||||
void ScopeVis::stop()
|
||||
{
|
||||
}
|
||||
|
||||
bool ScopeVisNG::handleMessage(const Message& message)
|
||||
bool ScopeVis::handleMessage(const Message& message)
|
||||
{
|
||||
if (DSPSignalNotification::match(message))
|
||||
{
|
||||
DSPSignalNotification& notif = (DSPSignalNotification&) message;
|
||||
setSampleRate(notif.getSampleRate());
|
||||
qDebug() << "ScopeVisNG::handleMessage: DSPSignalNotification: m_sampleRate: " << m_sampleRate;
|
||||
qDebug() << "ScopeVis::handleMessage: DSPSignalNotification: m_sampleRate: " << m_sampleRate;
|
||||
return true;
|
||||
}
|
||||
else if (MsgConfigureScopeVisNG::match(message))
|
||||
@ -642,7 +642,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
m_freeRun = freeRun;
|
||||
}
|
||||
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgConfigureScopeVisNG:"
|
||||
qDebug() << "ScopeVis::handleMessage: MsgConfigureScopeVisNG:"
|
||||
<< " m_traceSize: " << m_traceSize
|
||||
<< " m_timeOfsProMill: " << m_timeOfsProMill
|
||||
<< " m_preTriggerDelay: " << m_preTriggerDelay
|
||||
@ -656,7 +656,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
}
|
||||
else if (MsgScopeVisNGAddTrigger::match(message))
|
||||
{
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGAddTrigger";
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGAddTrigger";
|
||||
QMutexLocker configLocker(&m_mutex);
|
||||
MsgScopeVisNGAddTrigger& conf = (MsgScopeVisNGAddTrigger&) message;
|
||||
m_triggerConditions.push_back(new TriggerCondition(conf.getTriggerData()));
|
||||
@ -668,7 +668,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
QMutexLocker configLocker(&m_mutex);
|
||||
MsgScopeVisNGChangeTrigger& conf = (MsgScopeVisNGChangeTrigger&) message;
|
||||
uint32_t triggerIndex = conf.getTriggerIndex();
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGChangeTrigger: " << triggerIndex;
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGChangeTrigger: " << triggerIndex;
|
||||
|
||||
if (triggerIndex < m_triggerConditions.size())
|
||||
{
|
||||
@ -689,7 +689,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
QMutexLocker configLocker(&m_mutex);
|
||||
MsgScopeVisNGRemoveTrigger& conf = (MsgScopeVisNGRemoveTrigger&) message;
|
||||
uint32_t triggerIndex = conf.getTriggerIndex();
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGRemoveTrigger: " << triggerIndex;
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGRemoveTrigger: " << triggerIndex;
|
||||
|
||||
if (triggerIndex < m_triggerConditions.size())
|
||||
{
|
||||
@ -705,7 +705,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
QMutexLocker configLocker(&m_mutex);
|
||||
MsgScopeVisNGMoveTrigger& conf = (MsgScopeVisNGMoveTrigger&) message;
|
||||
int triggerIndex = conf.getTriggerIndex();
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGMoveTrigger: " << triggerIndex;
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGMoveTrigger: " << triggerIndex;
|
||||
|
||||
if (!conf.getMoveUp() && (triggerIndex == 0)) {
|
||||
return true;
|
||||
@ -727,7 +727,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
{
|
||||
MsgScopeVisNGFocusOnTrigger& conf = (MsgScopeVisNGFocusOnTrigger&) message;
|
||||
uint32_t triggerIndex = conf.getTriggerIndex();
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGFocusOnTrigger: " << triggerIndex;
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGFocusOnTrigger: " << triggerIndex;
|
||||
|
||||
if (triggerIndex < m_triggerConditions.size())
|
||||
{
|
||||
@ -741,7 +741,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
}
|
||||
else if (MsgScopeVisNGAddTrace::match(message))
|
||||
{
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGAddTrace";
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGAddTrace";
|
||||
QMutexLocker configLocker(&m_mutex);
|
||||
MsgScopeVisNGAddTrace& conf = (MsgScopeVisNGAddTrace&) message;
|
||||
m_traces.addTrace(conf.getTraceData(), m_traceSize);
|
||||
@ -757,7 +757,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
MsgScopeVisNGChangeTrace& conf = (MsgScopeVisNGChangeTrace&) message;
|
||||
bool doComputeTriggerLevelsOnDisplay = m_traces.isVerticalDisplayChange(conf.getTraceData(), conf.getTraceIndex());
|
||||
uint32_t traceIndex = conf.getTraceIndex();
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGChangeTrace: " << traceIndex;
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGChangeTrace: " << traceIndex;
|
||||
m_traces.changeTrace(conf.getTraceData(), traceIndex);
|
||||
updateMaxTraceDelay();
|
||||
if (doComputeTriggerLevelsOnDisplay) computeDisplayTriggerLevels();
|
||||
@ -769,7 +769,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
QMutexLocker configLocker(&m_mutex);
|
||||
MsgScopeVisNGRemoveTrace& conf = (MsgScopeVisNGRemoveTrace&) message;
|
||||
uint32_t traceIndex = conf.getTraceIndex();
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGRemoveTrace: " << traceIndex;
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGRemoveTrace: " << traceIndex;
|
||||
m_traces.removeTrace(traceIndex);
|
||||
updateMaxTraceDelay();
|
||||
computeDisplayTriggerLevels();
|
||||
@ -781,7 +781,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
QMutexLocker configLocker(&m_mutex);
|
||||
MsgScopeVisNGMoveTrace& conf = (MsgScopeVisNGMoveTrace&) message;
|
||||
uint32_t traceIndex = conf.getTraceIndex();
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGMoveTrace: " << traceIndex;
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGMoveTrace: " << traceIndex;
|
||||
m_traces.moveTrace(traceIndex, conf.getMoveUp());
|
||||
//updateMaxTraceDelay();
|
||||
computeDisplayTriggerLevels();
|
||||
@ -792,7 +792,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
{
|
||||
MsgScopeVisNGFocusOnTrace& conf = (MsgScopeVisNGFocusOnTrace&) message;
|
||||
uint32_t traceIndex = conf.getTraceIndex();
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGFocusOnTrace: " << traceIndex;
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGFocusOnTrace: " << traceIndex;
|
||||
|
||||
if (traceIndex < m_traces.m_tracesData.size())
|
||||
{
|
||||
@ -806,7 +806,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
}
|
||||
else if (MsgScopeVisNGOneShot::match(message))
|
||||
{
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGOneShot";
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGOneShot";
|
||||
MsgScopeVisNGOneShot& conf = (MsgScopeVisNGOneShot&) message;
|
||||
bool oneShot = conf.getOneShot();
|
||||
m_triggerOneShot = oneShot;
|
||||
@ -817,7 +817,7 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
{
|
||||
MsgScopeVisNGMemoryTrace& conf = (MsgScopeVisNGMemoryTrace&) message;
|
||||
uint32_t memoryIndex = conf.getMemoryIndex();
|
||||
qDebug() << "ScopeVisNG::handleMessage: MsgScopeVisNGMemoryTrace: " << memoryIndex;
|
||||
qDebug() << "ScopeVis::handleMessage: MsgScopeVisNGMemoryTrace: " << memoryIndex;
|
||||
|
||||
if (memoryIndex != m_currentTraceMemoryIndex)
|
||||
{
|
||||
@ -831,12 +831,12 @@ bool ScopeVisNG::handleMessage(const Message& message)
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "ScopeVisNG::handleMessage" << message.getIdentifier() << " not handled";
|
||||
qDebug() << "ScopeVis::handleMessage" << message.getIdentifier() << " not handled";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void ScopeVisNG::updateMaxTraceDelay()
|
||||
void ScopeVis::updateMaxTraceDelay()
|
||||
{
|
||||
int maxTraceDelay = 0;
|
||||
bool allocateCache = false;
|
||||
@ -883,7 +883,7 @@ void ScopeVisNG::updateMaxTraceDelay()
|
||||
m_maxTraceDelay = maxTraceDelay;
|
||||
}
|
||||
|
||||
void ScopeVisNG::initTraceBuffers()
|
||||
void ScopeVis::initTraceBuffers()
|
||||
{
|
||||
int shift = (m_timeOfsProMill / 1000.0) * m_traceSize;
|
||||
|
||||
@ -902,7 +902,7 @@ void ScopeVisNG::initTraceBuffers()
|
||||
}
|
||||
}
|
||||
|
||||
void ScopeVisNG::computeDisplayTriggerLevels()
|
||||
void ScopeVis::computeDisplayTriggerLevels()
|
||||
{
|
||||
std::vector<TraceData>::iterator itData = m_traces.m_tracesData.begin();
|
||||
|
||||
@ -944,7 +944,7 @@ void ScopeVisNG::computeDisplayTriggerLevels()
|
||||
}
|
||||
}
|
||||
|
||||
void ScopeVisNG::updateGLScopeDisplay()
|
||||
void ScopeVis::updateGLScopeDisplay()
|
||||
{
|
||||
if (m_currentTraceMemoryIndex > 0) {
|
||||
m_glScope->setConfigChanged();
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
class GLScope;
|
||||
|
||||
class SDRGUI_API ScopeVisNG : public BasebandSampleSink {
|
||||
class SDRGUI_API ScopeVis : public BasebandSampleSink {
|
||||
|
||||
public:
|
||||
struct TraceData
|
||||
@ -147,8 +147,8 @@ public:
|
||||
static const uint32_t m_maxNbTraces = 10;
|
||||
static const uint32_t m_nbTraceMemories = 50;
|
||||
|
||||
ScopeVisNG(GLScope* glScope = 0);
|
||||
virtual ~ScopeVisNG();
|
||||
ScopeVis(GLScope* glScope = 0);
|
||||
virtual ~ScopeVis();
|
||||
|
||||
void setSampleRate(int sampleRate);
|
||||
void configure(uint32_t traceSize, uint32_t timeBase, uint32_t timeOfsProMill, uint32_t triggerPre, bool freeRun);
|
||||
@ -760,7 +760,7 @@ private:
|
||||
{
|
||||
if (m_traces[0].size() < m_maxNbTraces)
|
||||
{
|
||||
qDebug("ScopeVisNG::addTrace");
|
||||
qDebug("ScopeVis::addTrace");
|
||||
m_traces[0].push_back(0);
|
||||
m_traces[1].push_back(0);
|
||||
m_tracesData.push_back(traceData);
|
||||
@ -786,7 +786,7 @@ private:
|
||||
{
|
||||
if (traceIndex < m_tracesControl.size())
|
||||
{
|
||||
qDebug("ScopeVisNG::removeTrace");
|
||||
qDebug("ScopeVis::removeTrace");
|
||||
m_traces[0].erase(m_traces[0].begin() + traceIndex);
|
||||
m_traces[1].erase(m_traces[1].begin() + traceIndex);
|
||||
TraceControl *traceControl = m_tracesControl[traceIndex];
|
||||
@ -912,7 +912,7 @@ private:
|
||||
}
|
||||
|
||||
// if (trigger) {
|
||||
// qDebug("ScopeVisNG::triggered: %s/%s %f/%f",
|
||||
// qDebug("ScopeVis::triggered: %s/%s %f/%f",
|
||||
// triggerCondition.m_prevCondition ? "T" : "F",
|
||||
// condition ? "T" : "F",
|
||||
// triggerCondition.m_projector->run(s),
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "util/messagequeue.h"
|
||||
|
||||
SpectrumScopeComboVis::SpectrumScopeComboVis(SpectrumVis* spectrumVis, ScopeVisNG* scopeVis) :
|
||||
SpectrumScopeComboVis::SpectrumScopeComboVis(SpectrumVis* spectrumVis, ScopeVis* scopeVis) :
|
||||
m_spectrumVis(spectrumVis),
|
||||
m_scopeVis(scopeVis)
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ class Message;
|
||||
class SDRGUI_API SpectrumScopeComboVis : public BasebandSampleSink {
|
||||
public:
|
||||
|
||||
SpectrumScopeComboVis(SpectrumVis* spectrumVis, ScopeVisNG* scopeVis);
|
||||
SpectrumScopeComboVis(SpectrumVis* spectrumVis, ScopeVis* scopeVis);
|
||||
virtual ~SpectrumScopeComboVis();
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);
|
||||
@ -21,7 +21,7 @@ public:
|
||||
|
||||
private:
|
||||
SpectrumVis* m_spectrumVis;
|
||||
ScopeVisNG* m_scopeVis;
|
||||
ScopeVis* m_scopeVis;
|
||||
};
|
||||
|
||||
#endif // INCLUDE_SPECTRUMSCOPENGCOMBOVIS_H
|
||||
|
@ -92,7 +92,7 @@ void GLScope::setDisplayTraceIntensity(int intensity)
|
||||
update();
|
||||
}
|
||||
|
||||
void GLScope::setTraces(std::vector<ScopeVisNG::TraceData>* tracesData, std::vector<float *>* traces)
|
||||
void GLScope::setTraces(std::vector<ScopeVis::TraceData>* tracesData, std::vector<float *>* traces)
|
||||
{
|
||||
m_tracesData = tracesData;
|
||||
m_traces = traces;
|
||||
@ -304,7 +304,7 @@ void GLScope::paintGL()
|
||||
if (m_traceSize > 0)
|
||||
{
|
||||
const float *trace = (*m_traces)[0];
|
||||
const ScopeVisNG::TraceData& traceData = (*m_tracesData)[0];
|
||||
const ScopeVis::TraceData& traceData = (*m_tracesData)[0];
|
||||
|
||||
if (traceData.m_viewTrace)
|
||||
{
|
||||
@ -487,7 +487,7 @@ void GLScope::paintGL()
|
||||
for (unsigned int i = 1; i < m_traces->size(); i++)
|
||||
{
|
||||
const float *trace = (*m_traces)[i];
|
||||
const ScopeVisNG::TraceData& traceData = (*m_tracesData)[i];
|
||||
const ScopeVis::TraceData& traceData = (*m_tracesData)[i];
|
||||
|
||||
if (!traceData.m_viewTrace) {
|
||||
continue;
|
||||
@ -713,7 +713,7 @@ void GLScope::paintGL()
|
||||
for (unsigned int i = 0; i < m_traces->size(); i++)
|
||||
{
|
||||
const float *trace = (*m_traces)[i];
|
||||
const ScopeVisNG::TraceData& traceData = (*m_tracesData)[i];
|
||||
const ScopeVis::TraceData& traceData = (*m_tracesData)[i];
|
||||
|
||||
if (!traceData.m_viewTrace) {
|
||||
continue;
|
||||
@ -889,7 +889,7 @@ void GLScope::paintGL()
|
||||
for (unsigned int i = 1; i < m_traces->size(); i++)
|
||||
{
|
||||
const float *trace = (*m_traces)[i];
|
||||
const ScopeVisNG::TraceData& traceData = (*m_tracesData)[i];
|
||||
const ScopeVis::TraceData& traceData = (*m_tracesData)[i];
|
||||
|
||||
if (!traceData.m_viewTrace) {
|
||||
continue;
|
||||
@ -1865,7 +1865,7 @@ void GLScope::setPolarDisplays()
|
||||
|
||||
void GLScope::setYScale(ScaleEngine& scale, uint32_t highlightedTraceIndex)
|
||||
{
|
||||
ScopeVisNG::TraceData& traceData = (*m_tracesData)[highlightedTraceIndex];
|
||||
ScopeVis::TraceData& traceData = (*m_tracesData)[highlightedTraceIndex];
|
||||
double amp_range = 2.0 / traceData.m_amp;
|
||||
double amp_ofs = traceData.m_ofs;
|
||||
double pow_floor = -100.0 + traceData.m_ofs * 100.0;
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
|
||||
void connectTimer(const QTimer& timer);
|
||||
|
||||
void setTraces(std::vector<ScopeVisNG::TraceData>* tracesData, std::vector<float *>* traces);
|
||||
void setTraces(std::vector<ScopeVis::TraceData>* tracesData, std::vector<float *>* traces);
|
||||
void newTraces(std::vector<float *>* traces);
|
||||
|
||||
int getSampleRate() const { return m_sampleRate; }
|
||||
@ -68,7 +68,7 @@ public:
|
||||
void updateDisplay();
|
||||
void setDisplayGridIntensity(int intensity);
|
||||
void setDisplayTraceIntensity(int intensity);
|
||||
void setFocusedTriggerData(ScopeVisNG::TriggerData& triggerData) { m_focusedTriggerData = triggerData; }
|
||||
void setFocusedTriggerData(ScopeVis::TriggerData& triggerData) { m_focusedTriggerData = triggerData; }
|
||||
void setConfigChanged() { m_configChanged = true; }
|
||||
//void incrementTraceCounter() { m_traceCounter++; }
|
||||
|
||||
@ -80,9 +80,9 @@ signals:
|
||||
void sampleRateChanged(int);
|
||||
|
||||
private:
|
||||
std::vector<ScopeVisNG::TraceData> *m_tracesData;
|
||||
std::vector<ScopeVis::TraceData> *m_tracesData;
|
||||
std::vector<float *> *m_traces;
|
||||
ScopeVisNG::TriggerData m_focusedTriggerData;
|
||||
ScopeVis::TriggerData m_focusedTriggerData;
|
||||
//int m_traceCounter;
|
||||
uint32_t m_bufferIndex;
|
||||
DisplayMode m_displayMode;
|
||||
|
@ -48,13 +48,13 @@ GLScopeGUI::GLScopeGUI(QWidget* parent) :
|
||||
qDebug("GLScopeGUI::GLScopeGUI");
|
||||
setEnabled(false);
|
||||
ui->setupUi(this);
|
||||
ui->trigDelayFine->setMaximum(ScopeVisNG::m_traceChunkSize / 10.0);
|
||||
ui->trigDelayFine->setMaximum(ScopeVis::m_traceChunkSize / 10.0);
|
||||
ui->traceColor->setStyleSheet("QLabel { background-color : rgb(255,255,64); }");
|
||||
m_focusedTraceColor.setRgb(255,255,64);
|
||||
ui->trigColor->setStyleSheet("QLabel { background-color : rgb(0,255,0); }");
|
||||
m_focusedTriggerColor.setRgb(0,255,0);
|
||||
ui->traceText->setText("X");
|
||||
ui->mem->setMaximum(ScopeVisNG::m_nbTraceMemories - 1);
|
||||
ui->mem->setMaximum(ScopeVis::m_nbTraceMemories - 1);
|
||||
}
|
||||
|
||||
GLScopeGUI::~GLScopeGUI()
|
||||
@ -62,7 +62,7 @@ GLScopeGUI::~GLScopeGUI()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScope* glScope)
|
||||
void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVis* scopeVis, GLScope* glScope)
|
||||
{
|
||||
qDebug("GLScopeGUI::setBuddies");
|
||||
|
||||
@ -91,12 +91,12 @@ void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GL
|
||||
ui->freerun->setChecked(true);
|
||||
|
||||
// Add a trigger
|
||||
ScopeVisNG::TriggerData triggerData;
|
||||
ScopeVis::TriggerData triggerData;
|
||||
fillTriggerData(triggerData);
|
||||
m_scopeVis->addTrigger(triggerData);
|
||||
|
||||
// Add a trace
|
||||
ScopeVisNG::TraceData traceData;
|
||||
ScopeVis::TraceData traceData;
|
||||
fillTraceData(traceData);
|
||||
m_scopeVis->addTrace(traceData);
|
||||
|
||||
@ -109,13 +109,13 @@ void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GL
|
||||
ui->trigMode->clear();
|
||||
fillProjectionCombo(ui->trigMode);
|
||||
|
||||
m_scopeVis->configure(2*m_traceLenMult*ScopeVisNG::m_traceChunkSize,
|
||||
m_scopeVis->configure(2*m_traceLenMult*ScopeVis::m_traceChunkSize,
|
||||
m_timeBase,
|
||||
m_timeOffset*10,
|
||||
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
|
||||
ui->freerun->isChecked());
|
||||
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVisNG::m_traceChunkSize,
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize,
|
||||
m_timeBase,
|
||||
m_timeOffset*10,
|
||||
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
|
||||
@ -165,8 +165,8 @@ QByteArray GLScopeGUI::serialize() const
|
||||
s.writeS32(6, ui->traceLen->value());
|
||||
|
||||
// second row - by trace
|
||||
const std::vector<ScopeVisNG::TraceData>& tracesData = m_scopeVis->getTracesData();
|
||||
std::vector<ScopeVisNG::TraceData>::const_iterator traceDataIt = tracesData.begin();
|
||||
const std::vector<ScopeVis::TraceData>& tracesData = m_scopeVis->getTracesData();
|
||||
std::vector<ScopeVis::TraceData>::const_iterator traceDataIt = tracesData.begin();
|
||||
s.writeU32(10, (uint32_t) tracesData.size());
|
||||
int i = 0;
|
||||
|
||||
@ -189,7 +189,7 @@ QByteArray GLScopeGUI::serialize() const
|
||||
|
||||
for (unsigned int i = 0; i < m_scopeVis->getNbTriggers(); i++)
|
||||
{
|
||||
const ScopeVisNG::TriggerData& triggerData = m_scopeVis->getTriggerData(i);
|
||||
const ScopeVis::TriggerData& triggerData = m_scopeVis->getTriggerData(i);
|
||||
s.writeS32(210 + 16*i, (int) triggerData.m_projectionType);
|
||||
s.writeS32(211 + 16*i, triggerData.m_triggerRepeat);
|
||||
s.writeBool(212 + 16*i, triggerData.m_triggerPositiveEdge);
|
||||
@ -275,7 +275,7 @@ bool GLScopeGUI::deserialize(const QByteArray& data)
|
||||
|
||||
uint32_t nbTracesSaved;
|
||||
d.readU32(10, &nbTracesSaved, 1);
|
||||
const std::vector<ScopeVisNG::TraceData>& tracesData = m_scopeVis->getTracesData();
|
||||
const std::vector<ScopeVis::TraceData>& tracesData = m_scopeVis->getTracesData();
|
||||
uint32_t iTrace = tracesData.size();
|
||||
|
||||
qDebug("GLScopeGUI::deserialize: nbTracesSaved: %u tracesData.size(): %lu", nbTracesSaved, tracesData.size());
|
||||
@ -288,7 +288,7 @@ bool GLScopeGUI::deserialize(const QByteArray& data)
|
||||
|
||||
for (iTrace = 0; iTrace < nbTracesSaved; iTrace++)
|
||||
{
|
||||
ScopeVisNG::TraceData traceData;
|
||||
ScopeVis::TraceData traceData;
|
||||
float r, g, b;
|
||||
|
||||
d.readS32(20 + 16*iTrace, &intValue, 0);
|
||||
@ -360,7 +360,7 @@ bool GLScopeGUI::deserialize(const QByteArray& data)
|
||||
|
||||
for (iTrigger = 0; iTrigger < nbTriggersSaved; iTrigger++)
|
||||
{
|
||||
ScopeVisNG::TriggerData triggerData = m_scopeVis->getTriggerData(iTrigger);
|
||||
ScopeVis::TriggerData triggerData = m_scopeVis->getTriggerData(iTrigger);
|
||||
float r, g, b;
|
||||
|
||||
d.readS32(210 + 16*iTrigger, &intValue, 0);
|
||||
@ -534,7 +534,7 @@ void GLScopeGUI::on_time_valueChanged(int value)
|
||||
m_timeBase = value;
|
||||
setTimeScaleDisplay();
|
||||
setTraceDelayDisplay();
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVisNG::m_traceChunkSize,
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize,
|
||||
m_timeBase,
|
||||
m_timeOffset*10,
|
||||
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
|
||||
@ -549,7 +549,7 @@ void GLScopeGUI::on_timeOfs_valueChanged(int value)
|
||||
|
||||
m_timeOffset = value;
|
||||
setTimeOfsDisplay();
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVisNG::m_traceChunkSize,
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize,
|
||||
m_timeBase,
|
||||
m_timeOffset*10,
|
||||
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
|
||||
@ -563,7 +563,7 @@ void GLScopeGUI::on_traceLen_valueChanged(int value)
|
||||
}
|
||||
|
||||
m_traceLenMult = value;
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVisNG::m_traceChunkSize,
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize,
|
||||
m_timeBase,
|
||||
m_timeOffset*10,
|
||||
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
|
||||
@ -579,7 +579,7 @@ void GLScopeGUI::on_trace_valueChanged(int value)
|
||||
{
|
||||
ui->traceText->setText(value == 0 ? "X" : QString("Y%1").arg(ui->trace->value()));
|
||||
|
||||
ScopeVisNG::TraceData traceData;
|
||||
ScopeVis::TraceData traceData;
|
||||
m_scopeVis->getTraceData(traceData, value);
|
||||
|
||||
qDebug() << "GLScopeGUI::on_trace_valueChanged:"
|
||||
@ -595,7 +595,7 @@ void GLScopeGUI::on_trace_valueChanged(int value)
|
||||
|
||||
void GLScopeGUI::on_traceAdd_clicked(bool checked __attribute__((unused)))
|
||||
{
|
||||
ScopeVisNG::TraceData traceData;
|
||||
ScopeVis::TraceData traceData;
|
||||
fillTraceData(traceData);
|
||||
addTrace(traceData);
|
||||
}
|
||||
@ -628,7 +628,7 @@ void GLScopeGUI::on_traceUp_clicked(bool checked __attribute__((unused)))
|
||||
int newTraceIndex = (ui->trace->value() + 1) % (ui->trace->maximum()+1);
|
||||
m_scopeVis->moveTrace(ui->trace->value(), true);
|
||||
ui->trace->setValue(newTraceIndex); // follow trace
|
||||
ScopeVisNG::TraceData traceData;
|
||||
ScopeVis::TraceData traceData;
|
||||
m_scopeVis->getTraceData(traceData, ui->trace->value());
|
||||
setTraceUI(traceData);
|
||||
m_scopeVis->focusOnTrace(ui->trace->value());
|
||||
@ -642,7 +642,7 @@ void GLScopeGUI::on_traceDown_clicked(bool checked __attribute__((unused)))
|
||||
int newTraceIndex = (ui->trace->value() - 1) % (ui->trace->maximum()+1);
|
||||
m_scopeVis->moveTrace(ui->trace->value(), false);
|
||||
ui->trace->setValue(newTraceIndex); // follow trace
|
||||
ScopeVisNG::TraceData traceData;
|
||||
ScopeVis::TraceData traceData;
|
||||
m_scopeVis->getTraceData(traceData, ui->trace->value());
|
||||
setTraceUI(traceData);
|
||||
m_scopeVis->focusOnTrace(ui->trace->value());
|
||||
@ -653,7 +653,7 @@ void GLScopeGUI::on_trig_valueChanged(int value)
|
||||
{
|
||||
ui->trigText->setText(tr("%1").arg(value));
|
||||
|
||||
ScopeVisNG::TriggerData triggerData;
|
||||
ScopeVis::TriggerData triggerData;
|
||||
m_scopeVis->getTriggerData(triggerData, value);
|
||||
|
||||
qDebug() << "GLScopeGUI::on_trig_valueChanged:"
|
||||
@ -670,7 +670,7 @@ void GLScopeGUI::on_trig_valueChanged(int value)
|
||||
|
||||
void GLScopeGUI::on_trigAdd_clicked(bool checked __attribute__((unused)))
|
||||
{
|
||||
ScopeVisNG::TriggerData triggerData;
|
||||
ScopeVis::TriggerData triggerData;
|
||||
fillTriggerData(triggerData);
|
||||
addTrigger(triggerData);
|
||||
}
|
||||
@ -691,7 +691,7 @@ void GLScopeGUI::on_trigUp_clicked(bool checked __attribute__((unused)))
|
||||
int newTriggerIndex = (ui->trig->value() + 1) % (ui->trig->maximum()+1);
|
||||
m_scopeVis->moveTrigger(ui->trace->value(), true);
|
||||
ui->trig->setValue(newTriggerIndex); // follow trigger
|
||||
ScopeVisNG::TriggerData triggerData;
|
||||
ScopeVis::TriggerData triggerData;
|
||||
m_scopeVis->getTriggerData(triggerData, ui->trig->value());
|
||||
setTriggerUI(triggerData);
|
||||
m_scopeVis->focusOnTrigger(ui->trig->value());
|
||||
@ -705,7 +705,7 @@ void GLScopeGUI::on_trigDown_clicked(bool checked __attribute__((unused)))
|
||||
int newTriggerIndex = (ui->trig->value() - 1) % (ui->trig->maximum()+1);
|
||||
m_scopeVis->moveTrigger(ui->trace->value(), false);
|
||||
ui->trig->setValue(newTriggerIndex); // follow trigger
|
||||
ScopeVisNG::TriggerData triggerData;
|
||||
ScopeVis::TriggerData triggerData;
|
||||
m_scopeVis->getTriggerData(triggerData, ui->trig->value());
|
||||
setTriggerUI(triggerData);
|
||||
m_scopeVis->focusOnTrigger(ui->trig->value());
|
||||
@ -846,7 +846,7 @@ void GLScopeGUI::on_trigDelayFine_valueChanged(int value __attribute__((unused))
|
||||
void GLScopeGUI::on_trigPre_valueChanged(int value __attribute__((unused)))
|
||||
{
|
||||
setTrigPreDisplay();
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVisNG::m_traceChunkSize,
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize,
|
||||
m_timeBase,
|
||||
m_timeOffset*10,
|
||||
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
|
||||
@ -884,7 +884,7 @@ void GLScopeGUI::on_freerun_toggled(bool checked)
|
||||
ui->trigOneShot->setEnabled(true);
|
||||
}
|
||||
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVisNG::m_traceChunkSize,
|
||||
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize,
|
||||
m_timeBase,
|
||||
m_timeOffset*10,
|
||||
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
|
||||
@ -941,7 +941,7 @@ void GLScopeGUI::setTimeScaleDisplay()
|
||||
|
||||
void GLScopeGUI::setTraceLenDisplay()
|
||||
{
|
||||
unsigned int n_samples = m_traceLenMult * ScopeVisNG::m_traceChunkSize;
|
||||
unsigned int n_samples = m_traceLenMult * ScopeVis::m_traceChunkSize;
|
||||
|
||||
if (n_samples < 1000) {
|
||||
ui->traceLenText->setToolTip(tr("%1 S").arg(n_samples));
|
||||
@ -1120,8 +1120,8 @@ void GLScopeGUI::setTrigDelayDisplay()
|
||||
{
|
||||
if (m_sampleRate > 0)
|
||||
{
|
||||
double delayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / (ScopeVisNG::m_traceChunkSize / 10.0);
|
||||
unsigned int n_samples_delay = m_traceLenMult * ScopeVisNG::m_traceChunkSize * delayMult;
|
||||
double delayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / (ScopeVis::m_traceChunkSize / 10.0);
|
||||
unsigned int n_samples_delay = m_traceLenMult * ScopeVis::m_traceChunkSize * delayMult;
|
||||
|
||||
if (n_samples_delay < 1000) {
|
||||
ui->trigDelayText->setToolTip(tr("%1 S").arg(n_samples_delay));
|
||||
@ -1177,7 +1177,7 @@ void GLScopeGUI::setTrigPreDisplay()
|
||||
|
||||
void GLScopeGUI::changeCurrentTrace()
|
||||
{
|
||||
ScopeVisNG::TraceData traceData;
|
||||
ScopeVis::TraceData traceData;
|
||||
fillTraceData(traceData);
|
||||
uint32_t currentTraceIndex = ui->trace->value();
|
||||
m_scopeVis->changeTrace(traceData, currentTraceIndex);
|
||||
@ -1185,7 +1185,7 @@ void GLScopeGUI::changeCurrentTrace()
|
||||
|
||||
void GLScopeGUI::changeCurrentTrigger()
|
||||
{
|
||||
ScopeVisNG::TriggerData triggerData;
|
||||
ScopeVis::TriggerData triggerData;
|
||||
fillTriggerData(triggerData);
|
||||
uint32_t currentTriggerIndex = ui->trig->value();
|
||||
m_scopeVis->changeTrigger(triggerData, currentTriggerIndex);
|
||||
@ -1226,7 +1226,7 @@ void GLScopeGUI::disableLiveMode(bool disable)
|
||||
ui->freerun->setEnabled(!disable);
|
||||
}
|
||||
|
||||
void GLScopeGUI::fillTraceData(ScopeVisNG::TraceData& traceData)
|
||||
void GLScopeGUI::fillTraceData(ScopeVis::TraceData& traceData)
|
||||
{
|
||||
traceData.m_projectionType = (Projector::ProjectionType) ui->traceMode->currentIndex();
|
||||
traceData.m_hasTextOverlay = (traceData.m_projectionType == Projector::ProjectionMagDB) || (traceData.m_projectionType == Projector::ProjectionMagSq);
|
||||
@ -1251,7 +1251,7 @@ void GLScopeGUI::fillTraceData(ScopeVisNG::TraceData& traceData)
|
||||
traceData.m_viewTrace = ui->traceView->isChecked();
|
||||
}
|
||||
|
||||
void GLScopeGUI::fillTriggerData(ScopeVisNG::TriggerData& triggerData)
|
||||
void GLScopeGUI::fillTriggerData(ScopeVis::TriggerData& triggerData)
|
||||
{
|
||||
triggerData.m_projectionType = (Projector::ProjectionType) ui->trigMode->currentIndex();
|
||||
triggerData.m_inputIndex = 0;
|
||||
@ -1261,14 +1261,14 @@ void GLScopeGUI::fillTriggerData(ScopeVisNG::TriggerData& triggerData)
|
||||
triggerData.m_triggerPositiveEdge = ui->trigPos->isChecked();
|
||||
triggerData.m_triggerBothEdges = ui->trigBoth->isChecked();
|
||||
triggerData.m_triggerRepeat = ui->trigCount->value();
|
||||
triggerData.m_triggerDelayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / (ScopeVisNG::m_traceChunkSize / 10.0);
|
||||
triggerData.m_triggerDelay = (int) (m_traceLenMult * ScopeVisNG::m_traceChunkSize * triggerData.m_triggerDelayMult);
|
||||
triggerData.m_triggerDelayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / (ScopeVis::m_traceChunkSize / 10.0);
|
||||
triggerData.m_triggerDelay = (int) (m_traceLenMult * ScopeVis::m_traceChunkSize * triggerData.m_triggerDelayMult);
|
||||
triggerData.m_triggerDelayCoarse = ui->trigDelayCoarse->value();
|
||||
triggerData.m_triggerDelayFine = ui->trigDelayFine->value();
|
||||
triggerData.setColor(m_focusedTriggerColor);
|
||||
}
|
||||
|
||||
void GLScopeGUI::setTraceUI(const ScopeVisNG::TraceData& traceData)
|
||||
void GLScopeGUI::setTraceUI(const ScopeVis::TraceData& traceData)
|
||||
{
|
||||
TraceUIBlocker traceUIBlocker(ui);
|
||||
|
||||
@ -1292,7 +1292,7 @@ void GLScopeGUI::setTraceUI(const ScopeVisNG::TraceData& traceData)
|
||||
ui->traceView->setChecked(traceData.m_viewTrace);
|
||||
}
|
||||
|
||||
void GLScopeGUI::setTriggerUI(const ScopeVisNG::TriggerData& triggerData)
|
||||
void GLScopeGUI::setTriggerUI(const ScopeVis::TriggerData& triggerData)
|
||||
{
|
||||
TrigUIBlocker trigUIBlocker(ui);
|
||||
|
||||
@ -1532,12 +1532,12 @@ void GLScopeGUI::setPreTrigger(int step)
|
||||
ui->trigPre->setValue(step);
|
||||
}
|
||||
|
||||
void GLScopeGUI::changeTrace(int traceIndex, const ScopeVisNG::TraceData& traceData)
|
||||
void GLScopeGUI::changeTrace(int traceIndex, const ScopeVis::TraceData& traceData)
|
||||
{
|
||||
m_scopeVis->changeTrace(traceData, traceIndex);
|
||||
}
|
||||
|
||||
void GLScopeGUI::addTrace(const ScopeVisNG::TraceData& traceData)
|
||||
void GLScopeGUI::addTrace(const ScopeVis::TraceData& traceData)
|
||||
{
|
||||
if (ui->trace->maximum() < 3)
|
||||
{
|
||||
@ -1559,12 +1559,12 @@ void GLScopeGUI::focusOnTrace(int traceIndex)
|
||||
on_trace_valueChanged(traceIndex);
|
||||
}
|
||||
|
||||
void GLScopeGUI::changeTrigger(int triggerIndex, const ScopeVisNG::TriggerData& triggerData)
|
||||
void GLScopeGUI::changeTrigger(int triggerIndex, const ScopeVis::TriggerData& triggerData)
|
||||
{
|
||||
m_scopeVis->changeTrigger(triggerData, triggerIndex);
|
||||
}
|
||||
|
||||
void GLScopeGUI::addTrigger(const ScopeVisNG::TriggerData& triggerData)
|
||||
void GLScopeGUI::addTrigger(const ScopeVis::TriggerData& triggerData)
|
||||
{
|
||||
if (ui->trig->maximum() < 9)
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
explicit GLScopeGUI(QWidget* parent = 0);
|
||||
~GLScopeGUI();
|
||||
|
||||
void setBuddies(MessageQueue* messageQueue, ScopeVisNG* scopeVis, GLScope* glScope);
|
||||
void setBuddies(MessageQueue* messageQueue, ScopeVis* scopeVis, GLScope* glScope);
|
||||
|
||||
void setSampleRate(int sampleRate);
|
||||
void resetToDefaults();
|
||||
@ -68,12 +68,12 @@ public:
|
||||
void setTraceLength(int step);
|
||||
void setPreTrigger(int step);
|
||||
// trace (second line):
|
||||
void changeTrace(int traceIndex, const ScopeVisNG::TraceData& traceData);
|
||||
void addTrace(const ScopeVisNG::TraceData& traceData);
|
||||
void changeTrace(int traceIndex, const ScopeVis::TraceData& traceData);
|
||||
void addTrace(const ScopeVis::TraceData& traceData);
|
||||
void focusOnTrace(int traceIndex);
|
||||
// trigger (third line):
|
||||
void changeTrigger(int triggerIndex, const ScopeVisNG::TriggerData& triggerData);
|
||||
void addTrigger(const ScopeVisNG::TriggerData& triggerData);
|
||||
void changeTrigger(int triggerIndex, const ScopeVis::TriggerData& triggerData);
|
||||
void addTrigger(const ScopeVis::TriggerData& triggerData);
|
||||
void focusOnTrigger(int triggerIndex);
|
||||
|
||||
private:
|
||||
@ -143,7 +143,7 @@ private:
|
||||
Ui::GLScopeGUI* ui;
|
||||
|
||||
MessageQueue* m_messageQueue;
|
||||
ScopeVisNG* m_scopeVis;
|
||||
ScopeVis* m_scopeVis;
|
||||
GLScope* m_glScope;
|
||||
|
||||
int m_sampleRate;
|
||||
@ -175,10 +175,10 @@ private:
|
||||
void changeCurrentTrace();
|
||||
void changeCurrentTrigger();
|
||||
|
||||
void fillTraceData(ScopeVisNG::TraceData& traceData);
|
||||
void fillTriggerData(ScopeVisNG::TriggerData& triggerData);
|
||||
void setTriggerUI(const ScopeVisNG::TriggerData& triggerData);
|
||||
void setTraceUI(const ScopeVisNG::TraceData& traceData);
|
||||
void fillTraceData(ScopeVis::TraceData& traceData);
|
||||
void fillTriggerData(ScopeVis::TriggerData& triggerData);
|
||||
void setTriggerUI(const ScopeVis::TriggerData& triggerData);
|
||||
void setTraceUI(const ScopeVis::TraceData& traceData);
|
||||
|
||||
void fillProjectionCombo(QComboBox* comboBox);
|
||||
void disableLiveMode(bool disable);
|
||||
|
Loading…
Reference in New Issue
Block a user