hide "slow strip" when compiling with HEAP_DEBUG
This commit is contained in:
@@ -193,7 +193,9 @@ void WLED::loop()
|
|||||||
#endif
|
#endif
|
||||||
#ifdef WLED_DEBUG
|
#ifdef WLED_DEBUG
|
||||||
stripMillis = millis() - stripMillis;
|
stripMillis = millis() - stripMillis;
|
||||||
|
#ifndef WLED_DEBUG_HEAP // WLEDMM heap debug messages take some time - this warning is popping in too often
|
||||||
if (stripMillis > 50) DEBUG_PRINTLN("Slow strip.");
|
if (stripMillis > 50) DEBUG_PRINTLN("Slow strip.");
|
||||||
|
#endif
|
||||||
avgStripMillis += stripMillis;
|
avgStripMillis += stripMillis;
|
||||||
if (stripMillis > maxStripMillis) maxStripMillis = stripMillis;
|
if (stripMillis > maxStripMillis) maxStripMillis = stripMillis;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ void esp_heap_trace_free_hook(void* ptr)
|
|||||||
Serial.println("** free: attempt to free nullptr.");
|
Serial.println("** free: attempt to free nullptr.");
|
||||||
} else {
|
} else {
|
||||||
size_t blocksize = heap_caps_get_allocated_size(ptr);
|
size_t blocksize = heap_caps_get_allocated_size(ptr);
|
||||||
if (blocksize > 256000)
|
if ((blocksize < 1) || (blocksize > 256000))
|
||||||
Serial.println("**** free: bad pointer to " + String(blocksize) + "bytes.");
|
Serial.println("**** free: bad pointer to " + String(blocksize) + "bytes.");
|
||||||
else
|
else
|
||||||
Serial.println("** free " + String(blocksize) + "bytes.");
|
Serial.println("** free " + String(blocksize) + "bytes.");
|
||||||
|
|||||||
Reference in New Issue
Block a user