def read_raw_pressure(self):
        """Reads the raw (uncompensated) pressure level from the sensor."""
        self.i2c.write8(BMP085_CONTROL, BMP085_READPRESSURECMD + (self._mode << 6))
        if self._mode == BMP085_ULTRALOWPOWER:
            time.sleep(0.005)
        elif self._mode == BMP085_HIGHRES:
            time.sleep(0.014)
        elif self._mode == BMP085_ULTRAHIGHRES:
            time.sleep(0.026)
        else:
            time.sleep(0.008)
        msb = self.i2c.read_U8(BMP085_PRESSUREDATA)
        lsb = self.i2c.read_U8(BMP085_PRESSUREDATA+1)
        xlsb = self.i2c.read_U8(BMP085_PRESSUREDATA+2)
        raw = ((msb << 16) + (lsb << 8) + xlsb) >> (8 - self._mode)
        self.logger.debug('Raw pressure 0x{0:04X} ({1})', raw & 0xFFFF, raw)
        return raw
def read_raw_pressure ( self ) : self . i2c . write8 ( BMP085_CONTROL , BMP085_READPRESSURECMD + ( self . _mode << 6 ) ) if self . _mode == BMP085_ULTRALOWPOWER : time . sleep ( 0.005 ) elif self . _mode == BMP085_HIGHRES : time . sleep ( 0.014 ) elif self . _mode == BMP085_ULTRAHIGHRES : time . sleep ( 0.026 ) else : time . sleep ( 0.008 ) msb = self . i2c . read_U8 ( BMP085_PRESSUREDATA ) lsb = self . i2c . read_U8 ( BMP085_PRESSUREDATA + 1 ) xlsb = self . i2c . read_U8 ( BMP085_PRESSUREDATA + 2 ) raw = ( ( msb << 16 ) + ( lsb << 8 ) + xlsb ) >> ( 8 - self . _mode ) self . logger . debug ( 'Raw pressure 0x{0:04X} ({1})' , raw & 0xFFFF , raw ) return raw
Reads the raw (uncompensated) pressure level from the sensor.