mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-24 18:57:43 +00:00
Set last byte to 0xFF if it ended at 0x00
As per an idea of @S5NC
This commit is contained in:
@@ -824,10 +824,10 @@ void NodeDB::updateFrom(const meshtastic_MeshPacket &mp)
|
||||
|
||||
// If this packet didn't travel any hops, then it was sent directly to us, so we know what to use as next hop to this node
|
||||
if (mp.original_hop_limit == mp.hop_limit) {
|
||||
info->next_hop = (uint8_t)(mp.from & 0xFF);
|
||||
info->next_hop = getLastByteOfNodeNum(mp.from);
|
||||
} else if (mp.relay_node && (mp.original_hop_limit - mp.hop_limit == 1)) {
|
||||
// This packet traveled one hop, so we can use the relay_node as next_hop
|
||||
info->next_hop = (uint8_t)(mp.relay_node & 0xFF);
|
||||
info->next_hop = getLastByteOfNodeNum(mp.relay_node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user