Skip to main content

temperature_raw_from_milli_celsius

Function temperature_raw_from_milli_celsius 

Source
pub fn temperature_raw_from_milli_celsius(milli_celsius: i32) -> u16
Expand description

Builds the raw temperature word a part reports for a temperature.

The inverse of milli_celsius, rounded to the nearest count and clamped to the part’s -45 °C to 130 °C output range, so a node can be tested against what a sensor would send without one attached.

§Arguments

  • milli_celsius - the temperature in millidegrees Celsius.

§Returns

The 16-bit temperature word.