6 static const int MAX_HISTORY = 256;
7 float m_samples[MAX_HISTORY];
14 m_hsamples = (m_hsamples+MAX_HISTORY-1) % MAX_HISTORY;
15 m_samples[m_hsamples] = val;
25 return m_samples[(m_hsamples+i) % MAX_HISTORY];
35 void setRect(
int ix,
int iy,
int iw,
int ih,
int ipad);
36 void setValueRange(
float ivmin,
float ivmax,
int indiv,
const char* iunits);
47 int idx,
const char* label,
const unsigned int col);
void drawGraph(const GraphParams *p, const ValueHistory *graph, int idx, const char *label, const unsigned int col)
Definition: ValueHistory.cpp:82
void drawGraphBackground(const GraphParams *p)
Definition: ValueHistory.cpp:60
Definition: ValueHistory.h:5
int getSampleCount() const
Definition: ValueHistory.h:18
ValueHistory()
Definition: ValueHistory.cpp:10
void addSample(const float val)
Definition: ValueHistory.h:12
float getSampleMin() const
Definition: ValueHistory.cpp:17
float getSampleMax() const
Definition: ValueHistory.cpp:26
float getSample(const int i) const
Definition: ValueHistory.h:23
float getAverage() const
Definition: ValueHistory.cpp:35
Definition: ValueHistory.h:34
void setRect(int ix, int iy, int iw, int ih, int ipad)
Definition: ValueHistory.cpp:43
int pad
Definition: ValueHistory.h:38
float vmin
Definition: ValueHistory.h:39
int ndiv
Definition: ValueHistory.h:40
void setValueRange(float ivmin, float ivmax, int indiv, const char *iunits)
Definition: ValueHistory.cpp:52
int x
Definition: ValueHistory.h:38
float vmax
Definition: ValueHistory.h:39
int h
Definition: ValueHistory.h:38
char units[16]
Definition: ValueHistory.h:41
int y
Definition: ValueHistory.h:38
int w
Definition: ValueHistory.h:38