hi,everyone
oscilloscope program give me methods to sample the voltage from ADC of s3c2440 platform.Now I have got it.
Then I want to add a square wave on the canvas which could be a comparison with the sampling curve.
I don't know how to implement it.
I know how to add a curve in plot.cpp:
p_curve
->setPen
(QPen(Qt
::green));
p_curve
->setRenderHint
(QwtPlotItem::RenderAntialiased,
true);
p_curve
->setPaintAttribute
(QwtPlotCurve::ClipPolygons,
false);
p_curve->setData(SquareWaveData());
p_curve->attach(this);
p_curve = new QwtPlotCurve();
p_curve->setStyle(QwtPlotCurve::Steps);
p_curve->setPen(QPen(Qt::green));
p_curve->setRenderHint(QwtPlotItem::RenderAntialiased, true);
p_curve->setPaintAttribute(QwtPlotCurve::ClipPolygons, false);
p_curve->setData(SquareWaveData());
p_curve->attach(this);
To copy to clipboard, switch view to plain text mode
The problem is how to produce the data for the square wave which is synchronous with the sampling curve?
Bookmarks