mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-23 01:41:29 +00:00
acw: airtime-scale jitter caps, companion surroundings awareness
- flood retransmit jitter now capped at min(2000ms, 6·airtime) instead of fixed 2000ms — spreads tighter at SF7, unchanged at SF8 - reactive per-dupe backoff cap now min(2000ms, 12·airtime), keeps semantic of "push past ~12 relay slots" - contention ring 16 → 24 for 50-neighbor hilltops - companions passively track heard floods (warms EMA without forwarding) and spread their own TX by up to min(1000ms, 3·airtime), hopefully fixing repeaters missing companion's first transmission config cleanup: - move BLE TX buffer bumps (ACL_TX=12 etc.) from zephcore_common.conf to esp32_common.conf — the Espressif blob needs them, nRF doesn't, and the bumps were overflowing nRF52840 RAM - remove CONFIG_ZEPHCORE_MAX_CONTACTS=510 overrides from 5 nRF52840 companion boards; Kconfig default of 350 fits with comfortable margin (wio prod: 91% → 79% RAM)
This commit is contained in:
1 parent
cba81af196
commit
ba4b86752d
17 files changed
+1909
-1864
No files matched your search
@@ -522,10 +522,14 @@ void RepeaterMesh::logTxFail(mesh::Packet* pkt, int len) {
|
||||
|
||||
uint32_t RepeaterMesh::getRetransmitDelay(const mesh::Packet* packet) {
|
||||
float factor = getContentionTracker().getFloodDelayFactor();
|
||||
uint32_t t = (uint32_t)(_radio->getEstAirtimeFor(
|
||||
packet->getPathByteLen() + packet->payload_len + 2) * factor);
|
||||
uint32_t max_jitter = 5 * t;
|
||||
/* Cap jitter to 2000ms to avoid excessive latency in very dense areas.
|
||||
uint32_t airtime = _radio->getEstAirtimeFor(
|
||||
packet->getPathByteLen() + packet->payload_len + 2);
|
||||
uint32_t max_jitter = (uint32_t)(5 * airtime * factor);
|
||||
/* Airtime-scaled ceiling: never exceed ~6 airtimes of spread
|
||||
* (keeps SF7/narrow-BW configs from wasting time in oversized jitter windows). */
|
||||
uint32_t airtime_cap = 6 * airtime;
|
||||
if (max_jitter > airtime_cap) max_jitter = airtime_cap;
|
||||
/* Absolute cap: avoid excessive latency in very dense areas.
|
||||
* Reactive backoff will fine-tune further if needed. */
|
||||
if (max_jitter > 2000) max_jitter = 2000;
|
||||
/* Floor: give downstream nodes time to finish RX processing
|
||||
|
||||
Reference in new issue
Block a user