source: flair-src/trunk/tools/FlairGCS/src/ScopeFixedStep.cpp@ 13

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

lic

File size: 815 bytes
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5#include "ScopeFixedStep.h"
6#include "Scrollbar.h"
7#include <qwt_plot_curve.h>
8
9ScopeFixedStep::ScopeFixedStep(QString title,float ymin,float ymax,float step_s,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) {
10 this->step_s=step_s;
11}
12
13ScopeFixedStep::~ScopeFixedStep() {
14
15}
16
17void ScopeFixedStep::plot(double* value) {
18 elapsed_time_s+=step_s;
19 for(int i=0;i<curves.count();i++) {
20 Curve* curve=curves.at(i);
21
22 curve->data_x[curve->index]=elapsed_time_s;
23 curve->data_y[curve->index]=value[i];
24 curve->index++;
25
26 updateCurve(curve);
27 }
28}
Note: See TracBrowser for help on using the repository browser.