pub fn duty_cycle_rx_mode(
sf: SpreadingFactor,
bw: Bandwidth,
rx_preamble: u16,
tx_preamble: u16,
) -> RxModeExpand description
Pick the RX mode for a strategy at the given modulation settings.
The duty-cycle windows treat rx_preamble (the receiver’s configured
acquisition length) as the number of preamble symbols that must land
inside a single RX window for reliable detection. With
rx = rx_preamble + 1 symbols awake and
sleep = tx_preamble - 2*rx_preamble - 1 symbols asleep, the worst
preamble alignment still puts rx_preamble symbols in one window
with a symbol to spare: a preamble that starts too late in one
window meets the next one after sleep + rx symbols, leaving
tx_preamble - sleep - rx - 1 >= rx_preamble symbols of it to hear.
(The chip’s detector actually fires on fewer symbols than the full
acquisition length, so the real margin is wider.)
Falls back to continuous RX when the TX preamble is too short to
leave any sleep (tx_preamble < 2*rx_preamble + 2 — the LR1110’s
16-symbol acquisition against the 32-symbol MeshCore preamble lands
here) or when a window overflows the chip’s 24-bit timers.