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

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

gcs

File size: 675 bytes
Line 
1#include "ScopeFixedStep.h"
2#include "Scrollbar.h"
3#include <qwt_plot_curve.h>
4
5ScopeFixedStep::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) {
6    this->step_s=step_s;
7}
8
9ScopeFixedStep::~ScopeFixedStep() {
10
11}
12
13void ScopeFixedStep::plot(double* value) {
14    elapsed_time_s+=step_s;
15    for(int i=0;i<curves.count();i++) {
16        Curve* curve=curves.at(i);
17
18        curve->data_x[curve->index]=elapsed_time_s;
19        curve->data_y[curve->index]=value[i];
20        curve->index++;
21
22        updateCurve(curve);
23    }
24}
Note: See TracBrowser for help on using the repository browser.