Commit a14621c4 authored by Oliver Bock's avatar Oliver Bock

Start scope at actual amplitude value (not at origin)

parent d07db042
......@@ -58,7 +58,7 @@ PulseScopeWidget::PulseScopeWidget(QWidget *parent) : QGraphicsView(parent),
setScene(&m_scene);
m_data.fill(0.0, m_scopeSizeH);
m_data.fill(0.0, qRound(m_scopeSizeH));
drawCurve(m_data);
}
......@@ -78,8 +78,8 @@ void PulseScopeWidget::drawCurve(const QVector<double>& vector)
{
m_data = vector;
QPainterPath pulsePath(QPoint(0.0, m_scopeSizeV));
for(int i = 0; i < m_scopeSizeH; ++i) {
QPainterPath pulsePath(QPointF(0.0, m_scopeSizeV - m_data.at(0)));
for(int i = 1; i < m_scopeSizeH; ++i) {
pulsePath.lineTo(i, m_scopeSizeV - m_data.at(i));
}
if(m_path == NULL) {
......
Markdown is supported
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