REALLY IMPORTANT: fix bug with retransmissions not happening

This commit is contained in:
Kevin Hester
2021-03-06 11:13:33 +08:00
parent 2c29e8b179
commit c88b9732eb
5 changed files with 44 additions and 16 deletions

View File

@@ -115,12 +115,17 @@ void Router::abortSendAndNak(Routing_Error err, MeshPacket *p)
packetPool.release(p);
}
void Router::setReceivedMessage() {
setInterval(0); // Run ASAP, so we can figure out our correct sleep time
}
ErrorCode Router::sendLocal(MeshPacket *p)
{
// No need to deliver externally if the destination is the local node
if (p->to == nodeDB.getNodeNum()) {
printPacket("Enqueuing local", p);
fromRadioQueue.enqueue(p);
setReceivedMessage();
return ERRNO_OK;
} else if (!iface) {
// We must be sending to remote nodes also, fail if no interface found