Improve ACK logic for responses and repeated packets (#5232)

* Don't send ACKs to responses over multiple hops

* Move repeated sending logic to `wasSeenRecently()`

* Add exception for simulator for duplicate packets from PhoneAPI

* Add short debug message
This commit is contained in:
GUVWAF
2024-11-03 06:21:45 -06:00
committed by GitHub
co-authored by GitHub
parent 1bec23b6bb
commit da7424a604
9 changed files with 34 additions and 34 deletions
+2 -3
View File
@@ -49,10 +49,9 @@ meshtastic_MeshPacket *RoutingModule::allocReply()
return NULL;
}
void RoutingModule::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopStart,
uint8_t hopLimit)
void RoutingModule::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopLimit)
{
auto p = allocAckNak(err, to, idFrom, chIndex, hopStart, hopLimit);
auto p = allocAckNak(err, to, idFrom, chIndex, hopLimit);
router->sendLocal(p); // we sometimes send directly to the local node
}