condition memory test to ESP boards and add define to the test config

#173
This commit is contained in:
1technophile committed 2018-02-18 19:00:41 +01:00
1 parent 6ec2773b20
commit d41957fd26
2 files changed
+3

No files matched your search

+2
View File
@@ -596,6 +596,7 @@ void loop()
if(RFM69toMQTT())
trc(F("RFM69toMQTT OK"));
#endif
#if defined(ESP8266) || defined(ESP32)
unsigned long now = millis();
if (now > (timer_sys_measures + TimeBetweenReadingSYS)) {//retriving value of memory ram every TimeBetweenReadingSYS
timer_sys_measures = millis();
@@ -604,6 +605,7 @@ void loop()
freeMem = ESP.getFreeHeap();
trc(String(freeMem));
}
#endif
}
}
+1
View File
@@ -168,5 +168,6 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
//variables to avoid duplicates
#define time_avoid_duplicate 3000 // if you want to avoid duplicate mqtt message received set this to > 0, the value is the time in milliseconds during which we don't publish duplicates
#define TimeBetweenReadingSYS 30000 // time between system readings (like memory)
/*-------------------ACTIVATE TRACES----------------------*/
#define TRACE 1 // 0= trace off 1 = trace on