source: flair-src/trunk/tools/FlairGCS/src/ScopeVariableStep.cpp@ 9

Last change on this file since 9 was 9, checked in by Sanahuja Guillaume, 8 years ago

gcs

File size: 722 bytes
Line 
1#include "ScopeVariableStep.h"
2#include "Scrollbar.h"
3#include <QTime>
4#include <qwt_plot_curve.h>
5
6ScopeVariableStep::ScopeVariableStep(QString title,float ymin,float ymax,float view_size_s,unsigned int refresh_rate_ms,unsigned int history_size): Scope(title,ymin,ymax,view_size_s,refresh_rate_ms,history_size) {
7
8}
9
10ScopeVariableStep::~ScopeVariableStep() {
11
12}
13
14void ScopeVariableStep::plot(double value,QTime time,unsigned int curve_index) {
15 static QTime start_time=QTime::currentTime();
16 Curve* curve=curves.at(curve_index);
17
18 elapsed_time_s=start_time.msecsTo(time)/1000.;
19 curve->data_x[curve->index]=elapsed_time_s;
20 curve->data_y[curve->index]=value;
21 curve->index++;
22
23 updateCurve(curve);
24}
Note: See TracBrowser for help on using the repository browser.