Update logging in Steuerung_Truhen.ino

add Truhenname in logs, empty line after one mess
This commit is contained in:
Simon Zeyer 2020-08-05 18:54:49 +00:00
parent fd8bdfb967
commit d5bc0b5fee

View File

@ -38,9 +38,8 @@ class Truhe {
void log(File logfile) {
//Serial.println(String(_name) + " log()");
String logdata = String(0) + "\t\t" + String(_cur_temp) + "\t" + String(_stat);
String logdata = String(_name) + "\t" + String(_cur_temp) + "\t" + String(_stat);
logfile.println(logdata);
logfile.println();
}
void updateLCD(int row) {
@ -107,7 +106,7 @@ class Truhe {
// measurements from the sensor. In the case of the DHT22,
// this value is of 2 seconds [1].
static const unsigned long MESS_REFRESH_INTERVAL = 10000; // ms getMinimumSamplingPeriod == 2 sec
static const unsigned long SCHALT_REFRESH_INTERVAL = 60000; // ms
static const unsigned long SCHALT_REFRESH_INTERVAL = 10000; // ms
static const unsigned long LCD_REFRESH_INTERVAL = 500; // ms
const int uT = 1; //Abschalt-Temperatur in °C
const int oT = 6; //Einschalt-Temperatur in °C
@ -179,6 +178,7 @@ void loop() {
truhen[i].log(logfile);
logfile.close();
}
logfile.println();
}
//Serial.println("Schaltintervall: "+ String(millis() - last_schalt_time) + " " + String(SCHALT_REFRESH_INTERVAL));
if(millis() - last_schalt_time >= SCHALT_REFRESH_INTERVAL || last_schalt_time == 0)