Skip to main content

micro_celsius

Function micro_celsius 

Source
pub fn micro_celsius(raw: i16) -> i32
Expand description

Decodes a temperature, limit, or offset register to microdegrees Celsius.

Odd codes end in half a microdegree, which is dropped toward zero: 0x0001 is 7812 and 0xFFFF is -7812. Use nano_celsius where that half matters.

§Arguments

  • raw - the signed 16-bit register value.

§Returns

The temperature in microdegrees Celsius, truncated toward zero.