need different data structure locally for coverage.

This commit is contained in:
medentem 2025-01-09 09:38:25 -06:00
parent ac6843562e
commit 5b82301f1d
2 changed files with 3 additions and 5 deletions

View File

@ -885,7 +885,7 @@ std::vector<NodeNum> NodeDB::getCoveredNodes(uint32_t timeWindowSecs)
uint32_t age = now - node.last_heard; uint32_t age = now - node.last_heard;
if (age <= timeWindowSecs) { if (age <= timeWindowSecs) {
allCandidates.push_back(NodeCandidate{node.relay_node, node.last_heard, node.snr}); allCandidates.push_back(NodeCandidate{node.num, node.last_heard, node.snr});
} }
} }
@ -897,9 +897,9 @@ std::vector<NodeNum> NodeDB::getCoveredNodes(uint32_t timeWindowSecs)
uint32_t age = now - node.last_heard; uint32_t age = now - node.last_heard;
if (age <= timeWindowSecs) { if (age <= timeWindowSecs) {
allCandidates.push_back(NodeCandidate{node.relay_node, node.last_heard, node.snr}); allCandidates.push_back(NodeCandidate{node.num, node.last_heard, node.snr});
} else { } else {
LOG_DEBUG("Node 0x%x is not valid for coverage: Aged Out", node.relay_node); LOG_DEBUG("Node 0x%x is not valid for coverage: Aged Out", node.num);
} }
} }

View File

@ -92,8 +92,6 @@ typedef struct _meshtastic_NodeInfoLite {
bool is_ignored; bool is_ignored;
/* Last byte of the node number of the node that should be used as the next hop to reach this node. */ /* Last byte of the node number of the node that should be used as the next hop to reach this node. */
uint8_t next_hop; uint8_t next_hop;
/* Node id of the relaying node. */
uint32_t relay_node;
} meshtastic_NodeInfoLite; } meshtastic_NodeInfoLite;
/* This message is never sent over the wire, but it is used for serializing DB /* This message is never sent over the wire, but it is used for serializing DB