You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
540 B
26 lines
540 B
#ifndef _SENSOR_HISTORY_H
|
|
#define _SENSOR_HISTORY_H
|
|
|
|
class SensorHistory {
|
|
public:
|
|
explicit SensorHistory(const int);
|
|
~SensorHistory();
|
|
void clear();
|
|
void addValue(const float);
|
|
float getAverage() const;
|
|
float getMin() const;
|
|
float getMax() const;
|
|
float getElement(int) const;
|
|
float getFirst() const;
|
|
int getSize() const { return _size; };
|
|
int getCount() const { return _cnt; };
|
|
protected:
|
|
int _size;
|
|
int _index;
|
|
int _cnt;
|
|
float* _values;
|
|
};
|
|
|
|
|
|
|
|
#endif /* _SENSOR_HISTORY_H */
|
|
|