From 5b82301f1d624965f85432c9a3de2aa4582c9dc6 Mon Sep 17 00:00:00 2001 From: medentem Date: Thu, 9 Jan 2025 09:38:25 -0600 Subject: [PATCH] need different data structure locally for coverage. --- src/mesh/NodeDB.cpp | 6 +++--- src/mesh/generated/meshtastic/deviceonly.pb.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 3c84a4424..f9d55805f 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -885,7 +885,7 @@ std::vector NodeDB::getCoveredNodes(uint32_t timeWindowSecs) uint32_t age = now - node.last_heard; 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 NodeDB::getCoveredNodes(uint32_t timeWindowSecs) uint32_t age = now - node.last_heard; 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 { - 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); } } diff --git a/src/mesh/generated/meshtastic/deviceonly.pb.h b/src/mesh/generated/meshtastic/deviceonly.pb.h index 097ff5b11..baafff413 100644 --- a/src/mesh/generated/meshtastic/deviceonly.pb.h +++ b/src/mesh/generated/meshtastic/deviceonly.pb.h @@ -92,8 +92,6 @@ typedef struct _meshtastic_NodeInfoLite { bool is_ignored; /* 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; - /* Node id of the relaying node. */ - uint32_t relay_node; } meshtastic_NodeInfoLite; /* This message is never sent over the wire, but it is used for serializing DB