pub struct Temperature {
    pub raw_value: u8,
    pub offset: i8,
}Expand description
Temperature value
This struct stores the raw ADC value, and can be used to calculate the
temperature in Celsius using the formula:
(raw_value * 0.4386) - (offset * 27.88) - 20.52
Fields§
§raw_value: u8Raw ADC value
offset: i8Offset value - depends on the temperature range configured
Implementations§
Source§impl Temperature
 
impl Temperature
Sourcepub fn to_celsius(&self) -> f32
 
pub fn to_celsius(&self) -> f32
Get the temperature in Celsius
Sourcepub fn to_fahrenheit(&self) -> f32
 
pub fn to_fahrenheit(&self) -> f32
Get the temperature in Fahrenheit