UT330BUI/model/UT330.py
def _get_temperature(self):

        """Returns the temperature from the device buffer data - including
        negative temperatures"""

        # Look to see if the temperature's negative - using two's complement
        # to represent negative numbers
        if self._buffer[self._index + 1] >= 128:
            temperature = -float(256*(self._buffer[self._index + 1] ^ 0xff) +
                                 (self._buffer[self._index] ^ 0xff) + 1)/10
        # Temperature is positive
        else:
            temperature = float(256*self._buffer[self._index + 1] +
                                self._buffer[self._index])/10

        return temperature
Returns the temperature from the device buffer data - including
        negative temperatures
Returns the temperature from the device buffer data - including
negative temperatures
Returns the temperature from the device buffer data - including negative temperatures
def _get_temperature(self):
        if self._buffer[self._index + 1] >= 128:
            temperature = -float(256*(self._buffer[self._index + 1] ^ 0xff) +
                                 (self._buffer[self._index] ^ 0xff) + 1)/10
        else:
            temperature = float(256*self._buffer[self._index + 1] +
                                self._buffer[self._index])/10
        return temperature
def _get_temperature ( self ) : if self . _buffer [ self . _index + 1 ] >= 128 : temperature = - float ( 256 * ( self . _buffer [ self . _index + 1 ] ^ 0xff ) + ( self . _buffer [ self . _index ] ^ 0xff ) + 1 ) / 10 else : temperature = float ( 256 * self . _buffer [ self . _index + 1 ] + self . _buffer [ self . _index ] ) / 10 return temperature
Returns the temperature from the device buffer data - including
negative temperatures
Returns the temperature from the device buffer data - including negative temperatures
"""Returns the temperature from the device buffer data - including
        negative temperatures""" # Look to see if the temperature's negative - using two's complement # to represent negative numbers # Temperature is positive
self