mirror of
https://github.com/meshtastic/firmware.git
synced 2026-11-07 23:04:49 -05:00
Router::runOnce() handles every queued reception (decrypt, modules, the phone; ~20 ms on nRF52) before the radio thread's TX timer can run, so a TX due in that time leaves late by as much, out of the slot its parity drew. On Jonathan's DMShell bench (round 57, T1000-E client, 3 x 300 s per arm) holding the reception took drawn fire-to-air with RX handling in the window from p90 26 ms to 7 ms, collided bursts from 6.0 to 0.0 per run (SDR agreeing), and total loss from 1.59% to 1.17%. - RadioLibInterface arms the TX timer through one helper, scheduleTransmitDelayCompleted(), which notes when it falls due if the front packet has a slot parity (0 otherwise), and clears the note when the timer runs. getTxDueMs() reports it; other radios report 0. - Router::runOnce() holds the next reception when such a TX is due within 30 ms, or is just past due and the radio thread has not run yet, and returns until 2 ms after the due time. Another arrival does not cut the hold short while the TX is pending. Each packet is held at most once, for at most 32 ms. - Packets without a slot parity never set a due time, so ordinary mesh traffic is unaffected. - Router.cpp now includes Throttle.h on every platform, not only portduino. Co-Authored-By: Jonathan Bennett <jbennett@incomsystems.biz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01REkPVFh6kvG4AZJ5A8AtM9