Skip to content

Commit

Permalink
#319 heap message outputs memory usage in percentage.
Browse files Browse the repository at this point in the history
  • Loading branch information
JotaroS committed Jul 14, 2020
1 parent ad2554e commit 478ab25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion firmware/src/tasks/task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ inline void Task::checkFps()
entry.second);
}

DPSerial::sendQueuedDebugLog("Free heap: %i of %i", ESP.getFreeHeap(), ESP.getHeapSize());
if(ESP.getHeapSize() != 0){
DPSerial::sendQueuedDebugLog("Free heap: %i of %i (%.3f %%)", ESP.getFreeHeap(), ESP.getHeapSize(), 100*ESP.getFreeHeap()/(float)ESP.getHeapSize());
}

#ifdef ENABLE_PERFMON
for(const auto& entry : PerfMon.getResults())
Expand Down

0 comments on commit 478ab25

Please sign in to comment.