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 13:21:45 +01:00
committed by GitHub
parent 1bec23b6bb
commit da7424a604
9 changed files with 34 additions and 34 deletions

View File

@@ -136,10 +136,9 @@ meshtastic_MeshPacket *Router::allocForSending()
/**
* Send an ack or a nak packet back towards whoever sent idFrom
*/
void Router::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopStart,
uint8_t hopLimit)
void Router::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopLimit)
{
routingModule->sendAckNak(err, to, idFrom, chIndex, hopStart, hopLimit);
routingModule->sendAckNak(err, to, idFrom, chIndex, hopLimit);
}
void Router::abortSendAndNak(meshtastic_Routing_Error err, meshtastic_MeshPacket *p)