Centralize getNodeId and fix references to owner.id (#8230)

This commit is contained in:
Ben Meadors
2025-10-06 07:56:27 -05:00
committed by GitHub
parent 036a58735e
commit 627c0145e7
8 changed files with 47 additions and 16 deletions

View File

@@ -1874,6 +1874,13 @@ uint8_t NodeDB::getMeshNodeChannel(NodeNum n)
return info->channel;
}
std::string NodeDB::getNodeId() const
{
char nodeId[16];
snprintf(nodeId, sizeof(nodeId), "!%08x", myNodeInfo.my_node_num);
return std::string(nodeId);
}
/// Find a node in our DB, return null for missing
/// NOTE: This function might be called from an ISR
meshtastic_NodeInfoLite *NodeDB::getMeshNode(NodeNum n)