-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenGLTimeSeriesGraph.hpp
More file actions
45 lines (34 loc) · 978 Bytes
/
OpenGLTimeSeriesGraph.hpp
File metadata and controls
45 lines (34 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// OpenGLTimeSeriesGraph.hpp
// OpenGLTutorial
//
// Created by Robby Tong on 2/16/19.
// Copyright © 2019 Robby Tong. All rights reserved.
//
#ifndef OpenGLTimeSeriesGraph_hpp
#define OpenGLTimeSeriesGraph_hpp
#include <stdio.h>
#include "OpenGLGraph.hpp"
#include "TimeSeries.hpp"
class OpenGLTimeSeriesGraph: public OpenGLGraph
{
private:
TimeSeries * mDataSeries;
char * mTitle;
bool mFFTMode;
public:
OpenGLTimeSeriesGraph(int pow2, const char title[]);
~OpenGLTimeSeriesGraph();
void updateWithNewSample(float sample);
virtual void updatePlotData(Point * data, size_t len) override;
virtual const char * getTitle(void) override;
void setFFTMode(bool enable_logging=false) {
mFFTMode = true;
mDataSeries->setFFTMode(enable_logging);
}
void setTimeMode(void) {
mFFTMode = false;
mDataSeries->setTimeMode();
}
};
#endif /* OpenGLTimeSeriesGraph_hpp */