loading data from collector

This commit is contained in:
Torsten Ruger
2021-06-28 11:29:15 +03:00
parent 568a8b88c3
commit abe85144a1
4 changed files with 82 additions and 51 deletions

View File

@ -8,20 +8,29 @@ void collector_setup();
void collector_loop();
#define WEEK 1500
#define MONTH 750
class Collector
{
protected:
float week_in[1500]; // 10 per hour, 1 week
float week_in[WEEK]; // 10 per hour, 1 week
float week_out[1500]; // 10 per hour, 1 week
float month_in[750]; // 1 per hour, about a month
float month_out[750]; // 1 per hour, about a month
float minute = 0 ;
int counter = 0;
int bucket = 30; // sampling every 2 sec
String one_week( float[] );
String one_month( float[] );
public:
const int bucket = 30; // sampling every 2 sec
void add(float in , float out) ;
String week_data();
String month_data();
};
extern Collector collector;