mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
don't grow nodedb if memory is tight.
also remove unconditional reboot on low heap. This is counter productive with this change
This commit is contained in:
@@ -767,7 +767,7 @@ meshtastic_NodeInfo *NodeDB::getOrCreateNode(NodeNum n)
|
||||
meshtastic_NodeInfo *info = getNode(n);
|
||||
|
||||
if (!info) {
|
||||
if (*numNodes >= MAX_NUM_NODES) {
|
||||
if ((*numNodes >= MAX_NUM_NODES) || (memGet.getFreeHeap() < meshtastic_NodeInfo_size * 3)) {
|
||||
screen->print("warning: node_db full! erasing oldest entry\n");
|
||||
// look for oldest node and erase it
|
||||
uint32_t oldest = UINT32_MAX;
|
||||
|
||||
Reference in New Issue
Block a user