Skip to main content

raw_from_micro_celsius

Function raw_from_micro_celsius 

Source
pub fn raw_from_micro_celsius(micro: i32) -> i16
Expand description

Builds the register value nearest a temperature in microdegrees Celsius.

The inverse of micro_celsius, for the limit and offset registers and for testing a node against what a sensor sends without one attached. Rounds to the nearest count, halves away from zero, and saturates at the ±256 °C register range.

§Arguments

  • micro - the temperature in microdegrees Celsius.

§Returns

The signed 16-bit register value.