mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-03 03:09:59 +00:00
more verbose thread debug
This commit is contained in:
parent
e73ae7cdac
commit
8364c2b147
@ -288,7 +288,17 @@ void Power::readPowerStatus()
|
|||||||
newStatus.notifyObservers(&powerStatus2);
|
newStatus.notifyObservers(&powerStatus2);
|
||||||
#ifdef DEBUG_HEAP
|
#ifdef DEBUG_HEAP
|
||||||
if (lastheap != ESP.getFreeHeap()) {
|
if (lastheap != ESP.getFreeHeap()) {
|
||||||
DEBUG_MSG("Heap status: %d/%d bytes free (%d), running %d threads\n", ESP.getFreeHeap(), ESP.getHeapSize(), ESP.getFreeHeap() - lastheap , concurrency::mainController.size(false));
|
DEBUG_MSG("Threads running:");
|
||||||
|
int running = 0;
|
||||||
|
for(int i = 0; i < MAX_THREADS; i++){
|
||||||
|
auto thread = concurrency::mainController.get(i);
|
||||||
|
if((thread != nullptr) && (thread->enabled)) {
|
||||||
|
DEBUG_MSG(" %s", thread->ThreadName.c_str());
|
||||||
|
running++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DEBUG_MSG("\n");
|
||||||
|
DEBUG_MSG("Heap status: %d/%d bytes free (%d), running %d/%d threads\n", ESP.getFreeHeap(), ESP.getHeapSize(), ESP.getFreeHeap() - lastheap, running, concurrency::mainController.size(false));
|
||||||
lastheap = ESP.getFreeHeap();
|
lastheap = ESP.getFreeHeap();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user