summaryrefslogtreecommitdiffstats
path: root/clients/tde
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-14 17:13:49 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-14 17:13:49 -0500
commitc50fa83bfd137b6b5aa7f9c1e4c310ddde75e585 (patch)
tree9a930f79f16690d94244815d4b2e36d68b94dd6a /clients/tde
parentfe06492794c15013e4511d1fcd623b0234c21afe (diff)
downloadulab-c50fa83bfd137b6b5aa7f9c1e4c310ddde75e585.tar.gz
ulab-c50fa83bfd137b6b5aa7f9c1e4c310ddde75e585.zip
Add profiling to scope trace grabber
Diffstat (limited to 'clients/tde')
-rw-r--r--clients/tde/src/part/scope/part.cpp27
-rw-r--r--clients/tde/src/widgets/tracewidget.cpp5
-rw-r--r--clients/tde/src/widgets/tracewidget.h4
3 files changed, 21 insertions, 15 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);
}
diff --git a/clients/tde/src/widgets/tracewidget.cpp b/clients/tde/src/widgets/tracewidget.cpp
index 911bf70..b814e43 100644
--- a/clients/tde/src/widgets/tracewidget.cpp
+++ b/clients/tde/src/widgets/tracewidget.cpp
@@ -667,6 +667,7 @@ void TraceWidget::setDisplayLimits(uint traceNumber, TQRectF limits) {
m_traceArray[traceNumber]->topEdge = limits.y();
m_traceArray[traceNumber]->bottomEdge = limits.height();
+ m_graticuleWidget->updateGraticule();
m_graticuleWidget->repaint(true);
updateTraceText();
updateCursorText();
@@ -761,13 +762,13 @@ void TraceWidget::setPositions(uint traceNumber, TQDoubleArray& tqda) {
m_graticuleWidget->repaint(true);
}
-TQColor& TraceWidget::traceColor(uint traceNumber) {
+TQColor TraceWidget::traceColor(uint traceNumber) {
VERIFY_TRACE_ARRAY_SIZE
return m_traceArray[traceNumber]->color;
}
-void TraceWidget::setTraceColor(uint traceNumber, TQColor& color) {
+void TraceWidget::setTraceColor(uint traceNumber, TQColor color) {
VERIFY_TRACE_ARRAY_SIZE
m_traceArray[traceNumber]->color = color;
diff --git a/clients/tde/src/widgets/tracewidget.h b/clients/tde/src/widgets/tracewidget.h
index b569074..0536ee9 100644
--- a/clients/tde/src/widgets/tracewidget.h
+++ b/clients/tde/src/widgets/tracewidget.h
@@ -174,8 +174,8 @@ class TraceWidget : public TQWidget
void setSamples(uint traceNumber, TQDoubleArray&);
TQDoubleArray& positions(uint traceNumber);
void setPositions(uint traceNumber, TQDoubleArray&);
- TQColor& traceColor(uint traceNumber);
- void setTraceColor(uint traceNumber, TQColor&);
+ TQColor traceColor(uint traceNumber);
+ void setTraceColor(uint traceNumber, TQColor);
bool traceEnabled(uint traceNumber);
void setTraceEnabled(uint traceNumber, bool enabled, bool showText=true);
TQString traceName(uint traceNumber);