From 278f5f66826327b11244c59932fb13f19bb70888 Mon Sep 17 00:00:00 2001 From: overkillfpv Date: Tue, 24 Mar 2026 18:30:44 +1100 Subject: [PATCH 1/4] added in requeue for packets that fail to be sent --- src/Dispatcher.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Dispatcher.cpp b/src/Dispatcher.cpp index 9d7a11131d..7945b3d039 100644 --- a/src/Dispatcher.cpp +++ b/src/Dispatcher.cpp @@ -330,9 +330,11 @@ void Dispatcher::checkSend() { MESH_DEBUG_PRINTLN("%s Dispatcher::loop(): ERROR: send start failed!", getLogDateTime()); logTxFail(outbound, outbound->getRawLength()); - - releasePacket(outbound); // return to pool + + // re-queue instead of dropping so the packet gets another chance + _mgr->queueOutbound(outbound, 0, futureMillis(getCADFailRetryDelay())); outbound = NULL; + next_tx_time = futureMillis(getCADFailRetryDelay()); return; } outbound_expiry = futureMillis(max_airtime); From 9675823fb4ae72a4b1cacddb17f4cefacd3d68e7 Mon Sep 17 00:00:00 2001 From: overkillfpv Date: Tue, 24 Mar 2026 18:45:27 +1100 Subject: [PATCH 2/4] Addedff in single delay calc that copilot suggested cause it's actually a solid idea --- src/Dispatcher.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Dispatcher.cpp b/src/Dispatcher.cpp index 7945b3d039..0df4665b53 100644 --- a/src/Dispatcher.cpp +++ b/src/Dispatcher.cpp @@ -332,9 +332,11 @@ void Dispatcher::checkSend() { logTxFail(outbound, outbound->getRawLength()); // re-queue instead of dropping so the packet gets another chance - _mgr->queueOutbound(outbound, 0, futureMillis(getCADFailRetryDelay())); + int retry_delay = getCADFailRetryDelay(); + unsigned long retry_time = futureMillis(retry_delay); + _mgr->queueOutbound(outbound, 0, retry_time); outbound = NULL; - next_tx_time = futureMillis(getCADFailRetryDelay()); + next_tx_time = retry_time; return; } outbound_expiry = futureMillis(max_airtime); From 9e7e0010154d12d951751c6be482b52a7e3cd8a8 Mon Sep 17 00:00:00 2001 From: overkillfpv Date: Tue, 24 Mar 2026 21:59:06 +1100 Subject: [PATCH 3/4] Updated timeout to 6 seconds --- src/Dispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dispatcher.cpp b/src/Dispatcher.cpp index 0df4665b53..9abd545f77 100644 --- a/src/Dispatcher.cpp +++ b/src/Dispatcher.cpp @@ -60,7 +60,7 @@ uint32_t Dispatcher::getCADFailRetryDelay() const { return 200; } uint32_t Dispatcher::getCADFailMaxDuration() const { - return 4000; // 4 seconds + return 6000; // 6 seconds } void Dispatcher::loop() { From 05dd84151ab672bc7aadd191c9e1b133c15bbaff Mon Sep 17 00:00:00 2001 From: overkillfpv Date: Tue, 7 Apr 2026 21:23:30 +1000 Subject: [PATCH 4/4] Increase CAD fail max duration from 6 seconds to 8 seconds for testing currently --- src/Dispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dispatcher.cpp b/src/Dispatcher.cpp index 9abd545f77..dd43b9ce59 100644 --- a/src/Dispatcher.cpp +++ b/src/Dispatcher.cpp @@ -60,7 +60,7 @@ uint32_t Dispatcher::getCADFailRetryDelay() const { return 200; } uint32_t Dispatcher::getCADFailMaxDuration() const { - return 6000; // 6 seconds + return 8000; // 8 seconds } void Dispatcher::loop() {