diff options
Diffstat (limited to 'clients/tde/src/part/scope')
-rw-r--r-- | clients/tde/src/part/scope/part.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/clients/tde/src/part/scope/part.cpp b/clients/tde/src/part/scope/part.cpp index a3400c4..387c901 100644 --- a/clients/tde/src/part/scope/part.cpp +++ b/clients/tde/src/part/scope/part.cpp @@ -623,10 +623,10 @@ void ScopePart::mainEventLoop() { if (result == "ACK") { // Update display widget(s) - m_traceWidget->setSamples(m_currentOpChannel, trace); - m_base->traceZoomWidget->setSamples(m_currentOpChannel, trace); - m_traceWidget->setPositions(m_currentOpChannel, positions); - m_base->traceZoomWidget->setPositions(m_currentOpChannel, positions); + m_traceWidget->setSamples(m_currentOpChannel-1, trace); + m_base->traceZoomWidget->setSamples(m_currentOpChannel-1, trace); + m_traceWidget->setPositions(m_currentOpChannel-1, positions); + m_base->traceZoomWidget->setPositions(m_currentOpChannel-1, positions); postProcessTrace(); m_traceWidget->repaint(true); m_base->traceZoomWidget->repaint(true); @@ -733,16 +733,21 @@ void ScopePart::updateGraticule() { m_base->traceZoomWidget->setNumberOfHorizontalDivisions(m_hdivs); m_base->traceZoomWidget->setNumberOfVerticalDivisions(m_vdivs); + m_traceWidget->setTraceColor(0, TQColor(255, 255, 255)); + m_traceWidget->setTraceColor(1, TQColor(0, 255, 0)); + m_traceWidget->setTraceColor(2, TQColor(255, 255, 0)); + m_traceWidget->setTraceColor(3, TQColor(64, 64, 255)); + for (int traceno=1; traceno<=m_maxNumberOfTraces; traceno++) { - m_traceWidget->setTraceEnabled(traceno, m_channelActive[traceno]); - m_traceWidget->setTraceName(traceno, TQString("Channel %1").arg(traceno)); - m_traceWidget->setTraceHorizontalUnits(traceno, "s"); - m_traceWidget->setTraceVerticalUnits(traceno, "V"); + m_traceWidget->setTraceEnabled(traceno-1, m_channelActive[traceno]); + m_traceWidget->setTraceName(traceno-1, TQString("Channel %1").arg(traceno)); + m_traceWidget->setTraceHorizontalUnits(traceno-1, "s"); + m_traceWidget->setTraceVerticalUnits(traceno-1, "V"); - m_traceWidget->setNumberOfSamples(traceno, m_samplesInTrace[traceno]); - m_base->traceZoomWidget->setNumberOfSamples(traceno, m_samplesInTrace[traceno]); + m_traceWidget->setNumberOfSamples(traceno-1, m_samplesInTrace[traceno]); + m_base->traceZoomWidget->setNumberOfSamples(traceno-1, m_samplesInTrace[traceno]); - m_traceWidget->setDisplayLimits(traceno, TQRectF(0.0, (m_voltsDiv[traceno]*m_vdivs)/2.0, (m_secsDiv[traceno]*m_hdivs), (m_voltsDiv[traceno]*m_vdivs)/-2.0)); + m_traceWidget->setDisplayLimits(traceno-1, TQRectF(0.0, (m_voltsDiv[traceno]*m_vdivs)/2.0, (m_secsDiv[traceno]*m_hdivs), (m_voltsDiv[traceno]*m_vdivs)/-2.0)); printf("[RAJA DEBUG 700.0] m_voltsDiv[%d]: %f m_vdivs: %d m_secsDiv[%d]: %f m_hdivs: %d\n\r", traceno, m_voltsDiv[traceno], m_vdivs, traceno, m_secsDiv[traceno], m_hdivs); fflush(stdout); } |