mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-03 00:20:43 +00:00
Formatting and correct NUM_RETRANSMISSIONS
This commit is contained in:
@@ -49,13 +49,13 @@ bool PacketHistory::wasSeenRecently(const meshtastic_MeshPacket *p, bool withUpd
|
||||
}
|
||||
|
||||
if (seenRecently) {
|
||||
// If it was seen with a next-hop not set to us and now it's NO_NEXT_HOP_PREFERENCE, relayer relayed already before, it's
|
||||
// a fallback to flooding. If we didn't already relay and the next-hop neither, consider it unseen because we might need
|
||||
// to handle it now
|
||||
// If it was seen with a next-hop not set to us and now it's NO_NEXT_HOP_PREFERENCE, and the relayer relayed already
|
||||
// before, it's a fallback to flooding. If we didn't already relay and the next-hop neither, consider it unseen because we
|
||||
// might need to handle it now
|
||||
uint8_t ourRelayID = nodeDB->getLastByteOfNodeNum(nodeDB->getNodeNum());
|
||||
if (found->sender != nodeDB->getNodeNum() && found->next_hop != NO_NEXT_HOP_PREFERENCE &&
|
||||
p->next_hop == NO_NEXT_HOP_PREFERENCE && found->next_hop != ourRelayID && wasRelayer(p->relay_node, found) &&
|
||||
!wasRelayer(ourRelayID, found) && !wasRelayer(found->next_hop, found)) {
|
||||
if (found->sender != nodeDB->getNodeNum() && found->next_hop != NO_NEXT_HOP_PREFERENCE && found->next_hop != ourRelayID &&
|
||||
p->next_hop == NO_NEXT_HOP_PREFERENCE && wasRelayer(p->relay_node, found) && !wasRelayer(ourRelayID, found) &&
|
||||
!wasRelayer(found->next_hop, found)) {
|
||||
LOG_INFO("Fallback to flooding, consider unseen relay_node=0x%x", p->relay_node);
|
||||
seenRecently = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user