From 7d00e1cef9408eb0470b589b84554c611a583f8e Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sun, 4 Aug 2024 18:52:10 -0500 Subject: [PATCH] Output more useful log message when the NodeDB is full (#4389) --- src/mesh/NodeDB.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 1f66857f8d..de63af08ef 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -1010,7 +1010,8 @@ meshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n) if ((numMeshNodes >= MAX_NUM_NODES) || (memGet.getFreeHeap() < meshtastic_NodeInfoLite_size * 3)) { if (screen) screen->print("Warn: node database full!\nErasing oldest entry\n"); - LOG_WARN("Node database full! Erasing oldest entry\n"); + LOG_WARN("Node database full with %i nodes and %i bytes free! Erasing oldest entry\n", numMeshNodes, + memGet.getFreeHeap()); // look for oldest node and erase it uint32_t oldest = UINT32_MAX; int oldestIndex = -1;