Skip to main content

reachable

Function reachable 

Source
pub const fn reachable(offset_hz: i32) -> bool
Expand description

Whether a channel offset is one the radio can actually hear.

§Arguments

  • offset_hz - how far from the carrier the channel sits.

§Returns

Whether it falls inside the radio’s window.

§Examples

use pamoja_radios::sx1302::channel::{reachable, MAX_OFFSET_HZ};

assert_eq!(MAX_OFFSET_HZ, 737_500);
assert!(reachable(700_000));

// The register carries this happily. The radio does not hear it.
assert!(!reachable(1_000_000));