45 const int TASK_SDCARD_LOG_CLEAN = BIT0; ///< Clean spiffs logfile directory |
45 const int TASK_SDCARD_LOG_CLEAN = BIT0; ///< Clean spiffs logfile directory |
46 const int TASK_SDCARD_LOG_CLOSE = BIT1; ///< Close the logfile. |
46 const int TASK_SDCARD_LOG_CLOSE = BIT1; ///< Close the logfile. |
47 |
47 |
48 extern time_t now; |
48 extern time_t now; |
49 extern struct tm timeinfo; |
49 extern struct tm timeinfo; |
50 |
50 extern uint32_t TimeBrewing; |
51 |
51 |
52 |
52 |
53 void log_begin(time_t t) |
53 void log_begin(time_t t) |
54 { |
54 { |
55 struct tm timeinfo; |
55 struct tm timeinfo; |
141 { |
141 { |
142 char filename[32]; |
142 char filename[32]; |
143 char bordercolor[9], color[9], pos[8]; |
143 char bordercolor[9], color[9], pos[8]; |
144 FILE *f; |
144 FILE *f; |
145 bool addcomma = true; |
145 bool addcomma = true; |
|
146 int Hour = (TimeBrewing / 3600); |
|
147 int Minute = ((TimeBrewing % 3600) / 60); |
146 |
148 |
147 if (strlen(sdcard_state->logfile)) { |
149 if (strlen(sdcard_state->logfile)) { |
148 sprintf(filename, "/spiffs/log/%s.anno", sdcard_state->logfile); |
150 sprintf(filename, "/spiffs/log/%s.anno", sdcard_state->logfile); |
149 |
151 |
150 switch (annotation_type) { |
152 switch (annotation_type) { |