Use the hop_limit field of MeshPacket to limit max delivery depth in

the mesh.
This commit is contained in:
geeksville
2020-05-18 17:35:23 -07:00
parent 53c3d9baa2
commit 26d3ef529e
9 changed files with 51 additions and 33 deletions

View File

@@ -115,8 +115,9 @@ size_t RadioInterface::beginSending(MeshPacket *p)
h->from = p->from;
h->to = p->to;
h->flags = 0;
h->id = p->id;
assert(p->hop_limit <= HOP_MAX);
h->flags = p->hop_limit;
// if the sender nodenum is zero, that means uninitialized
assert(h->from);