mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
clean up ack packets
This commit is contained in:
@@ -38,20 +38,14 @@ void RoutingPlugin::sendAckNak(Routing_Error err, NodeNum to, PacketId idFrom)
|
||||
{
|
||||
Routing c = Routing_init_default;
|
||||
|
||||
if (!err) {
|
||||
c.success_id = idFrom;
|
||||
} else {
|
||||
c.fail_id = idFrom;
|
||||
|
||||
// Also send back the error reason
|
||||
c.error_reason = err;
|
||||
}
|
||||
c.error_reason = err;
|
||||
|
||||
auto p = allocDataProtobuf(c);
|
||||
p->priority = MeshPacket_Priority_ACK;
|
||||
|
||||
p->hop_limit = 0; // Assume just immediate neighbors for now
|
||||
p->to = to;
|
||||
p->decoded.request_id = idFrom;
|
||||
DEBUG_MSG("Sending an err=%d,to=0x%x,idFrom=0x%x,id=0x%x\n", err, to, idFrom, p->id);
|
||||
|
||||
router->sendLocal(p); // we sometimes send directly to the local node
|
||||
|
||||
Reference in New Issue
Block a user