Skip to main content

threshold_dbm

Function threshold_dbm 

Source
pub const fn threshold_dbm(byte: u8) -> i8
Expand description

Reads a threshold byte back as decibels.

§Arguments

  • byte - what the radio was programmed with.

§Returns

The threshold in dBm.

§Examples

use pamoja_radios::sx1302::lbt::{threshold_byte, threshold_dbm};

// Every threshold a caller would set survives the round trip.
for dbm in -120..0 {
    assert_eq!(threshold_dbm(threshold_byte(dbm)), dbm);
}