Rev | Line | |
---|
| 1 | #include "ScopeFixedStep.h"
|
---|
| 2 | #include "Scrollbar.h"
|
---|
| 3 | #include <qwt_plot_curve.h>
|
---|
| 4 |
|
---|
| 5 | 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) {
|
---|
| 6 | this->step_s=step_s;
|
---|
| 7 | }
|
---|
| 8 |
|
---|
| 9 | ScopeFixedStep::~ScopeFixedStep() {
|
---|
| 10 |
|
---|
| 11 | }
|
---|
| 12 |
|
---|
| 13 | void 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.