mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-26 01:52:48 +00:00
try-fix: max nodes crash during boot (#2712)
* try-fix: nodenum crash during boot
* Revert "try-fix: nodenum crash during boot"
This reverts commit 632012e197
.
* try-fix: max nodes crash during boot
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
parent
3d6fb13f9a
commit
84ddfea491
@ -790,7 +790,8 @@ meshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n)
|
|||||||
|
|
||||||
if (!lite) {
|
if (!lite) {
|
||||||
if ((*numMeshNodes >= MAX_NUM_NODES) || (memGet.getFreeHeap() < meshtastic_NodeInfoLite_size * 3)) {
|
if ((*numMeshNodes >= MAX_NUM_NODES) || (memGet.getFreeHeap() < meshtastic_NodeInfoLite_size * 3)) {
|
||||||
screen->print("warning: node_db_lite full! erasing oldest entry\n");
|
if (screen)
|
||||||
|
screen->print("warning: node_db_lite full! erasing oldest entry\n");
|
||||||
// look for oldest node and erase it
|
// look for oldest node and erase it
|
||||||
uint32_t oldest = UINT32_MAX;
|
uint32_t oldest = UINT32_MAX;
|
||||||
int oldestIndex = -1;
|
int oldestIndex = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user