Skip to main content

temperature_raw

Function temperature_raw 

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

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

The inverse of milli_celsius, so a node can be tested against what a sensor sends without one attached.

§Arguments

  • milli_celsius - the temperature in milli-degrees Celsius.

§Returns

The 16-bit temperature word, clamped to the sensor’s -45 to 130 °C word range.