mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-31 15:10:40 +00:00
Improve ACKs for repeated packets and responses
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -13,8 +13,7 @@ class RoutingModule : public ProtobufModule<meshtastic_Routing>
|
||||
*/
|
||||
RoutingModule();
|
||||
|
||||
void sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopStart = 0,
|
||||
uint8_t hopLimit = 0);
|
||||
void sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopLimit = 0);
|
||||
|
||||
// Given the hopStart and hopLimit upon reception of a request, return the hop limit to use for the response
|
||||
uint8_t getHopLimitForResponse(uint8_t hopStart, uint8_t hopLimit);
|
||||
@@ -36,4 +35,4 @@ class RoutingModule : public ProtobufModule<meshtastic_Routing>
|
||||
virtual bool wantPacket(const meshtastic_MeshPacket *p) override { return true; }
|
||||
};
|
||||
|
||||
extern RoutingModule *routingModule;
|
||||
extern RoutingModule *routingModule;
|
||||
Reference in New Issue
Block a user