Commit 99313a66 authored by Oliver Bock's avatar Oliver Bock
Browse files

Let y-axis range be -1 to 1

parent 7f130bed
......@@ -50,7 +50,7 @@ PulseScopeWidget::PulseScopeWidget(QWidget *parent) : QGraphicsView(parent),
}
m_scopeSizeH = 360.0;
m_scopeSizeV = 1.0;
m_scopeSizeV = 2.0;
m_path = NULL;
m_marker = m_scene.addLine(0.0, 0.0, 0.0, m_scopeSizeV);
......@@ -78,9 +78,9 @@ void PulseScopeWidget::drawCurve(const QVector<double>& vector)
{
m_data = vector;
QPainterPath pulsePath(QPointF(0.0, m_scopeSizeV - m_data.at(0)));
QPainterPath pulsePath(QPointF(0.0, m_scopeSizeV - m_data.at(0) - 1.0));
for(int i = 1; i < m_scopeSizeH; ++i) {
pulsePath.lineTo(i, m_scopeSizeV - m_data.at(i));
pulsePath.lineTo(i, m_scopeSizeV - m_data.at(i) - 1.0);
}
if(m_path == NULL) {
m_path = m_scene.addPath(pulsePath, QPen(Qt::yellow));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment