pub fn temperature(&mut self) -> Result<f32, DI::Error>{
        //If conversion mode is normally off, a one-time conversion should be done.
        //The one shot conversion takes about 150ms and then the bit is reset.
        //On automatic conversion mode, the temperature can requested without 1-shot trigger

        let cmode = self.config.conversion_mode;
        match cmode {
            CMode::NormallyOff => {
                self.config.one_shot_conversion = OneShot::OneShotConversion;
                self.send_c0()?; //One shot only changes c0. This part is executed often
            }
            _ => {}
        } 

        let mut buffer = [0u8; 4]; // Three bytes of temperature data
        buffer[0] = Registers::LTCBH.read_address;
        self.iface.read(&mut buffer)?;
        // TODO Check if any of the faults are triggered especially 
        // Check for over/under voltage or open circuit fault

        // The three bits are rearranged to derive the temperature
        let sign = if buffer[1] & 0x80 == 0x80 {-1.0} else {1.0};
        let mut value = ((buffer[1] & 0x7F) as i32) << 24;
        value += (buffer[2] as i32) << 16;
        value += (buffer[3] as i32) << 8;
        Ok(sign * (value as f32)/1048576.0)
    }
/// Get the linearized and cold-junction-compensated thermocouple
/// temperature value.
Get the linearized and cold-junction-compensated thermocouple
temperature value.
Get the linearized and cold - junction - compensated thermocouple temperature value .
pub fn temperature(&mut self) -> Result<f32, DI::Error>{
        //If conversion mode is normally off, a one-time conversion should be done.
        //The one shot conversion takes about 150ms and then the bit is reset.
        //On automatic conversion mode, the temperature can requested without 1-shot trigger
        let cmode = self.config.conversion_mode;
        match cmode {
            CMode::NormallyOff => {
                self.config.one_shot_conversion = OneShot::OneShotConversion;
                self.send_c0()?; //One shot only changes c0. This part is executed often
            }
            _ => {}
        } 
        let mut buffer = [0u8; 4]; // Three bytes of temperature data
        buffer[0] = Registers::LTCBH.read_address;
        self.iface.read(&mut buffer)?;
        // TODO Check if any of the faults are triggered especially 
        // Check for over/under voltage or open circuit fault
        // The three bits are rearranged to derive the temperature
        let sign = if buffer[1] & 0x80 == 0x80 {-1.0} else {1.0};
        let mut value = ((buffer[1] & 0x7F) as i32) << 24;
        value += (buffer[2] as i32) << 16;
        value += (buffer[3] as i32) << 8;
        Ok(sign * (value as f32)/1048576.0)
    }
pub fn temperature ( & mut self ) -> Result < f32 , DI :: Error > { //If conversion mode is normally off, a one-time conversion should be done. //The one shot conversion takes about 150ms and then the bit is reset. //On automatic conversion mode, the temperature can requested without 1-shot trigger let cmode = self . config . conversion_mode ; match cmode { CMode :: NormallyOff => { self . config . one_shot_conversion = OneShot :: OneShotConversion ; self . send_c0 ( ) ? ; //One shot only changes c0. This part is executed often } _ => { } } let mut buffer = [ 0u8 ; 4 ] ; // Three bytes of temperature data buffer [ 0 ] = Registers :: LTCBH . read_address ; self . iface . read ( & mut buffer ) ? ; // TODO Check if any of the faults are triggered especially  // Check for over/under voltage or open circuit fault // The three bits are rearranged to derive the temperature let sign = if buffer [ 1 ] & 0x80 == 0x80 { - 1.0 } else { 1.0 } ; let mut value = ( ( buffer [ 1 ] & 0x7F ) as i32 ) << 24 ; value += ( buffer [ 2 ] as i32 ) << 16 ; value += ( buffer [ 3 ] as i32 ) << 8 ; Ok ( sign * ( value as f32 ) / 1048576.0 ) }
Get the linearized and cold-junction-compensated thermocouple
temperature value.
Get the linearized and cold - junction - compensated thermocouple temperature value .
&mut self