hi,everyone
oscilloscope example plots sinus waveform on the cavas .Now I have got it.
Then I want to add a second independant waveform for example square waveform or triangular waveform on the canvas which could be a comparison with the sampling curve.
when I study the Oscillocope's example , the sinus waveform is genereted in this function
double SamplingThread::value( double timeStamp ) const
{
const double period = 1.0 / d_frequency;
const double x = ::fmod( timeStamp, period );
const double v = d_amplitude * qFastSin( x / period * 2 * M_PI );
return v;
}
how can I implement it ?
how can I to produce the data for thesecond dynamic wave ( square wave , triangular or sinus ) which is synchronous with the sampling curve?
any Help would be appreciated
Bookmarks