mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-02 18:59:56 +00:00
more verbose thread debug
This commit is contained in:
parent
e73ae7cdac
commit
8364c2b147
@ -287,8 +287,18 @@ void Power::readPowerStatus()
|
||||
powerStatus2.getIsCharging(), powerStatus2.getBatteryVoltageMv(), powerStatus2.getBatteryChargePercent());
|
||||
newStatus.notifyObservers(&powerStatus2);
|
||||
#ifdef DEBUG_HEAP
|
||||
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));
|
||||
if (lastheap != ESP.getFreeHeap()) {
|
||||
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();
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user