Changeset 15 in flair-src for trunk/tools/FlairGCS/src/ScopeFixedStep.cpp


Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (5 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/src/ScopeFixedStep.cpp

    r10 r15  
    77#include <qwt_plot_curve.h>
    88
    9 ScopeFixedStep::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;
     9ScopeFixedStep::ScopeFixedStep(QString title, float ymin, float ymax,
     10                               float step_s, float view_size_s,
     11                               unsigned int refresh_rate_ms,
     12                               unsigned int history_size)
     13    : Scope(title, ymin, ymax, view_size_s, refresh_rate_ms, history_size) {
     14  this->step_s = step_s;
    1115}
    1216
    13 ScopeFixedStep::~ScopeFixedStep() {
     17ScopeFixedStep::~ScopeFixedStep() {}
    1418
     19void ScopeFixedStep::plot(double *value) {
     20  elapsed_time_s += step_s;
     21  for (int i = 0; i < curves.count(); i++) {
     22    Curve *curve = curves.at(i);
     23
     24    curve->data_x[curve->index] = elapsed_time_s;
     25    curve->data_y[curve->index] = value[i];
     26    curve->index++;
     27
     28    updateCurve(curve);
     29  }
    1530}
    16 
    17 void 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 TracChangeset for help on using the changeset viewer.