Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
I need to do a realtime data plotting using pwt. The data are obtained from other device through serial port. I have finished serial port communication base on qt and QextSerialPort and I have noticed that there is an oscilloscope example which was close to my requirement. But I still have some troubles with this example.
first, Are there some detailed explaination about the class CurveData and SignalData. There are no comments about the two classes. I knew that they provide the data used to plot, but I could not understand how they work, even where the sine curve come from.
next, Is it possible to use these two classes to hold my data which come from serial port and how to do that if they can hold external data.
On 02/01/2013 11:13 AM, 鱿鱼 wrote:
> Are there some detailed explaination about the class CurveData
> and SignalData.
No - oscilloscope is more a demo showing what can be done with Qwt than
what you expect from an example
> Is it possible to use these two classes to hold my data which come
> from serial port and how to do that if they can hold external data.
Replace the code in SamplingThread::value(), instead by reading a value
from the serial port. If periodically polling is not what you need
replace SamplingThread::sample() and feed
SignalData::instance().append() somehow else.