Ignore:
Timestamp:
04/08/16 15:40:57 (8 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

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

    r10 r15  
    88#include <qwt_plot_curve.h>
    99
    10 ScopeVariableStep::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) {
     10ScopeVariableStep::ScopeVariableStep(QString title, float ymin, float ymax,
     11                                     float view_size_s,
     12                                     unsigned int refresh_rate_ms,
     13                                     unsigned int history_size)
     14    : Scope(title, ymin, ymax, view_size_s, refresh_rate_ms, history_size) {}
    1115
     16ScopeVariableStep::~ScopeVariableStep() {}
     17
     18void ScopeVariableStep::plot(double value, QTime time,
     19                             unsigned int curve_index) {
     20  static QTime start_time = QTime::currentTime();
     21  Curve *curve = curves.at(curve_index);
     22
     23  elapsed_time_s = start_time.msecsTo(time) / 1000.;
     24  curve->data_x[curve->index] = elapsed_time_s;
     25  curve->data_y[curve->index] = value;
     26  curve->index++;
     27
     28  updateCurve(curve);
    1229}
    13 
    14 ScopeVariableStep::~ScopeVariableStep() {
    15 
    16 }
    17 
    18 void ScopeVariableStep::plot(double value,QTime time,unsigned int curve_index) {
    19     static QTime start_time=QTime::currentTime();
    20     Curve* curve=curves.at(curve_index);
    21 
    22     elapsed_time_s=start_time.msecsTo(time)/1000.;
    23     curve->data_x[curve->index]=elapsed_time_s;
    24     curve->data_y[curve->index]=value;
    25     curve->index++;
    26 
    27     updateCurve(curve);
    28 }
Note: See TracChangeset for help on using the changeset viewer.