Initial version of NextHopRouter

This commit is contained in:
GUVWAF
2023-10-02 19:31:23 +02:00
parent a6e4402e41
commit 0d6729b9eb
20 changed files with 316 additions and 36 deletions

View File

@@ -814,6 +814,16 @@ meshtastic_NodeInfoLite *NodeDB::getMeshNode(NodeNum n)
return NULL;
}
// Find a node in the database that matches the last byte, return 0 if not found
NodeNum NodeDB::findMatchingNodeNum(uint8_t last_byte)
{
for (int i = 0; i < *numMeshNodes; i++)
if ((uint8_t)(meshNodes[i].num & 0xFF) == last_byte)
return meshNodes[i].num;
return 0;
}
/// Find a node in our DB, create an empty NodeInfo if missing
meshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n)
{