pub const fn low_rate_optimize(spreading_factor: u8, bandwidth_hz: u32) -> boolExpand description
Whether a rate is slow enough to need the low data rate optimization.
A symbol that lasts long enough drifts against the receiver clock before it ends, and the two ends have to agree to carry fewer bits in it. Which rates those are depends on the bandwidth as well as the spreading factor.
§Arguments
spreading_factor- the spreading factor.bandwidth_hz- the bandwidth, in hertz.
§Returns
Whether the optimization is on for that pair.
§Examples
use pamoja_radios::sx1302::channel::low_rate_optimize;
assert!(low_rate_optimize(11, 125_000));
assert!(low_rate_optimize(12, 125_000));
assert!(!low_rate_optimize(10, 125_000));
// The same spreading factor twice as wide halves the symbol, so it is only on at SF12.
assert!(!low_rate_optimize(11, 250_000));
assert!(low_rate_optimize(12, 250_000));
assert!(!low_rate_optimize(12, 500_000));