|
|
|
|
@ -51,7 +51,7 @@ GLScopeGUI::GLScopeGUI(QWidget* parent) :
@@ -51,7 +51,7 @@ GLScopeGUI::GLScopeGUI(QWidget* parent) :
|
|
|
|
|
qDebug("GLScopeGUI::GLScopeGUI"); |
|
|
|
|
setEnabled(false); |
|
|
|
|
ui->setupUi(this); |
|
|
|
|
ui->trigDelayFine->setMaximum(ScopeVis::m_traceChunkSize / 10.0); |
|
|
|
|
ui->trigDelayFine->setMaximum(ScopeVis::m_traceChunkDefaultSize / 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); }"); |
|
|
|
|
@ -114,13 +114,13 @@ void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVis* scopeVis, GLSc
@@ -114,13 +114,13 @@ void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVis* scopeVis, GLSc
|
|
|
|
|
ui->trigMode->clear(); |
|
|
|
|
fillProjectionCombo(ui->trigMode); |
|
|
|
|
|
|
|
|
|
m_scopeVis->configure(2*m_traceLenMult*ScopeVis::m_traceChunkSize, |
|
|
|
|
m_scopeVis->configure(2*m_traceLenMult*m_scopeVis->getTraceChunkSize(), |
|
|
|
|
m_timeBase, |
|
|
|
|
m_timeOffset*10, |
|
|
|
|
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)), |
|
|
|
|
ui->freerun->isChecked()); |
|
|
|
|
|
|
|
|
|
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize, |
|
|
|
|
m_scopeVis->configure(m_traceLenMult*m_scopeVis->getTraceChunkSize(), |
|
|
|
|
m_timeBase, |
|
|
|
|
m_timeOffset*10, |
|
|
|
|
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)), |
|
|
|
|
@ -155,7 +155,7 @@ void GLScopeGUI::on_scope_sampleRateChanged(int sampleRate)
@@ -155,7 +155,7 @@ void GLScopeGUI::on_scope_sampleRateChanged(int sampleRate)
|
|
|
|
|
void GLScopeGUI::on_scope_traceSizeChanged(uint32_t traceNbSamples) |
|
|
|
|
{ |
|
|
|
|
qDebug("GLScopeGUI::on_scope_traceSizeChanged: %u", traceNbSamples); |
|
|
|
|
m_traceLenMult = traceNbSamples / ScopeVis::m_traceChunkSize; |
|
|
|
|
m_traceLenMult = traceNbSamples / m_scopeVis->getTraceChunkSize(); |
|
|
|
|
ui->traceLen->setValue(m_traceLenMult); |
|
|
|
|
setTraceLenDisplay(); |
|
|
|
|
} |
|
|
|
|
@ -557,7 +557,7 @@ void GLScopeGUI::on_time_valueChanged(int value)
@@ -557,7 +557,7 @@ void GLScopeGUI::on_time_valueChanged(int value)
|
|
|
|
|
m_timeBase = value; |
|
|
|
|
setTimeScaleDisplay(); |
|
|
|
|
setTraceDelayDisplay(); |
|
|
|
|
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize, |
|
|
|
|
m_scopeVis->configure(m_traceLenMult*m_scopeVis->getTraceChunkSize(), |
|
|
|
|
m_timeBase, |
|
|
|
|
m_timeOffset*10, |
|
|
|
|
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)), |
|
|
|
|
@ -572,7 +572,7 @@ void GLScopeGUI::on_timeOfs_valueChanged(int value)
@@ -572,7 +572,7 @@ void GLScopeGUI::on_timeOfs_valueChanged(int value)
|
|
|
|
|
|
|
|
|
|
m_timeOffset = value; |
|
|
|
|
setTimeOfsDisplay(); |
|
|
|
|
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize, |
|
|
|
|
m_scopeVis->configure(m_traceLenMult*m_scopeVis->getTraceChunkSize(), |
|
|
|
|
m_timeBase, |
|
|
|
|
m_timeOffset*10, |
|
|
|
|
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)), |
|
|
|
|
@ -586,7 +586,7 @@ void GLScopeGUI::on_traceLen_valueChanged(int value)
@@ -586,7 +586,7 @@ void GLScopeGUI::on_traceLen_valueChanged(int value)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
m_traceLenMult = value; |
|
|
|
|
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize, |
|
|
|
|
m_scopeVis->configure(m_traceLenMult*m_scopeVis->getTraceChunkSize(), |
|
|
|
|
m_timeBase, |
|
|
|
|
m_timeOffset*10, |
|
|
|
|
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)), |
|
|
|
|
@ -956,7 +956,7 @@ void GLScopeGUI::on_trigPre_valueChanged(int value)
@@ -956,7 +956,7 @@ void GLScopeGUI::on_trigPre_valueChanged(int value)
|
|
|
|
|
{ |
|
|
|
|
(void) value; |
|
|
|
|
setTrigPreDisplay(); |
|
|
|
|
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize, |
|
|
|
|
m_scopeVis->configure(m_traceLenMult*m_scopeVis->getTraceChunkSize(), |
|
|
|
|
m_timeBase, |
|
|
|
|
m_timeOffset*10, |
|
|
|
|
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)), |
|
|
|
|
@ -994,7 +994,7 @@ void GLScopeGUI::on_freerun_toggled(bool checked)
@@ -994,7 +994,7 @@ void GLScopeGUI::on_freerun_toggled(bool checked)
|
|
|
|
|
ui->trigOneShot->setEnabled(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize, |
|
|
|
|
m_scopeVis->configure(m_traceLenMult*m_scopeVis->getTraceChunkSize(), |
|
|
|
|
m_timeBase, |
|
|
|
|
m_timeOffset*10, |
|
|
|
|
(uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)), |
|
|
|
|
@ -1051,7 +1051,7 @@ void GLScopeGUI::setTimeScaleDisplay()
@@ -1051,7 +1051,7 @@ void GLScopeGUI::setTimeScaleDisplay()
|
|
|
|
|
|
|
|
|
|
void GLScopeGUI::setTraceLenDisplay() |
|
|
|
|
{ |
|
|
|
|
unsigned int n_samples = m_traceLenMult * ScopeVis::m_traceChunkSize; |
|
|
|
|
unsigned int n_samples = m_traceLenMult * m_scopeVis->getTraceChunkSize(); |
|
|
|
|
|
|
|
|
|
if (n_samples < 1000) { |
|
|
|
|
ui->traceLenText->setToolTip(tr("%1 S").arg(n_samples)); |
|
|
|
|
@ -1230,8 +1230,8 @@ void GLScopeGUI::setTrigDelayDisplay()
@@ -1230,8 +1230,8 @@ void GLScopeGUI::setTrigDelayDisplay()
|
|
|
|
|
{ |
|
|
|
|
if (m_sampleRate > 0) |
|
|
|
|
{ |
|
|
|
|
double delayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / (ScopeVis::m_traceChunkSize / 10.0); |
|
|
|
|
unsigned int n_samples_delay = m_traceLenMult * ScopeVis::m_traceChunkSize * delayMult; |
|
|
|
|
double delayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / (m_scopeVis->getTraceChunkSize() / 10.0); |
|
|
|
|
unsigned int n_samples_delay = m_traceLenMult * m_scopeVis->getTraceChunkSize() * delayMult; |
|
|
|
|
|
|
|
|
|
if (n_samples_delay < 1000) { |
|
|
|
|
ui->trigDelayText->setToolTip(tr("%1 S").arg(n_samples_delay)); |
|
|
|
|
@ -1374,8 +1374,8 @@ void GLScopeGUI::fillTriggerData(ScopeVis::TriggerData& triggerData)
@@ -1374,8 +1374,8 @@ void GLScopeGUI::fillTriggerData(ScopeVis::TriggerData& triggerData)
|
|
|
|
|
triggerData.m_triggerBothEdges = ui->trigBoth->isChecked(); |
|
|
|
|
triggerData.m_triggerHoldoff = ui->trigHoldoff->value(); |
|
|
|
|
triggerData.m_triggerRepeat = ui->trigCount->value(); |
|
|
|
|
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_triggerDelayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / (m_scopeVis->getTraceChunkSize() / 10.0); |
|
|
|
|
triggerData.m_triggerDelay = (int) (m_traceLenMult * m_scopeVis->getTraceChunkSize() * triggerData.m_triggerDelayMult); |
|
|
|
|
triggerData.m_triggerDelayCoarse = ui->trigDelayCoarse->value(); |
|
|
|
|
triggerData.m_triggerDelayFine = ui->trigDelayFine->value(); |
|
|
|
|
triggerData.setColor(m_focusedTriggerColor); |
|
|
|
|
@ -1694,4 +1694,7 @@ void GLScopeGUI::focusOnTrigger(int triggerIndex)
@@ -1694,4 +1694,7 @@ void GLScopeGUI::focusOnTrigger(int triggerIndex)
|
|
|
|
|
on_trig_valueChanged(triggerIndex); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void GLScopeGUI::traceLengthChange() |
|
|
|
|
{ |
|
|
|
|
on_traceLen_valueChanged(m_traceLenMult); |
|
|
|
|
} |
|
|
|
|
|