-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathLogger.h
More file actions
36 lines (30 loc) · 782 Bytes
/
Logger.h
File metadata and controls
36 lines (30 loc) · 782 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
#pragma once
#include "RingBuffer.h"
class Logger
{
public:
char name[9]; //name, like "Temp1" or "Light"
Logger(const char * logger_name);
//void log(int value);
void timed_log(int value);
void setup();
bool available();
aJsonObject * json();
void printjson(Stream * output);
char* dirname_l1(char *dirname);
char* dirname_l2(char *dirname);
char* dirname_l3(char *dirname);
void load();
void load_all();
bool match(const char * request);
time_t time; // from Time.h, included by GrowduinoFirmware.h
int peek();
private:
int buf_min[60];
int idx_min; // postiton of last save
int idx_min_new; // postiton of new data
int idx_h_new;
int idx_day_new;
bool timed;
int peekval;
};