edu.udayton.udri.asset.raspi.bmp180/src/edu/udayton/udri/asset/raspi/bmp180/Bmp180Sensor.java
private void readCalibrationData() throws IOException
    {
        final byte[] bytes = new byte[CALIBRATION_BYTES];

        m_Bmp180.read(EEPROM_START, bytes, 0, CALIBRATION_BYTES);
        final DataInputStream bmp180CaliIn = new DataInputStream(new ByteArrayInputStream(bytes));
        
        m_CalibrationData = new int[CALIBRATION_SIZE];

        for (int i = 0; i < m_CalibrationData.length; i++)
        {
            if (CALIBRATION_ARRAY_AC4 <= i && i <= CALIBRATION_ARRAY_AC6)
            {
                m_CalibrationData[i] = bmp180CaliIn.readUnsignedShort();
            }
            else
            {
                if (i == CALIBRATION_ARRAY_MB)
                {
                    bmp180CaliIn.readShort();
                    m_CalibrationData[i] = bmp180CaliIn.readShort();
                }
                else
                {
                    m_CalibrationData[i] = bmp180CaliIn.readShort();
                }
            }
        }
    }
/**
     * Reads the calibration data from the BMP180 sensor. There is an extra short read as the MB registry data on the 
     * BMP180 is not needed, but all calibration bytes must be read in order.
     *  
     * @throws IOException when failing to read a byte either from across i2c or from the data stream  
     */
Reads the calibration data from the BMP180 sensor. There is an extra short read as the MB registry data on the
BMP180 is not needed, but all calibration bytes must be read in order.

@throws IOException when failing to read a byte either from across i2c or from the data stream
Reads the calibration data from the BMP180 sensor . There is an extra short read as the MB registry data on the BMP180 is not needed but all calibration bytes must be read in order . @throws IOException when failing to read a byte either from across i2c or from the data stream
private void readCalibrationData() throws IOException
    {
        final byte[] bytes = new byte[CALIBRATION_BYTES];
        m_Bmp180.read(EEPROM_START, bytes, 0, CALIBRATION_BYTES);
        final DataInputStream bmp180CaliIn = new DataInputStream(new ByteArrayInputStream(bytes));
        m_CalibrationData = new int[CALIBRATION_SIZE];
        for (int i = 0; i < m_CalibrationData.length; i++)
        {
            if (CALIBRATION_ARRAY_AC4 <= i && i <= CALIBRATION_ARRAY_AC6)
            {
                m_CalibrationData[i] = bmp180CaliIn.readUnsignedShort();
            }
            else
            {
                if (i == CALIBRATION_ARRAY_MB)
                {
                    bmp180CaliIn.readShort();
                    m_CalibrationData[i] = bmp180CaliIn.readShort();
                }
                else
                {
                    m_CalibrationData[i] = bmp180CaliIn.readShort();
                }
            }
        }
    }
private void readCalibrationData ( ) throws IOException { final byte [ ] bytes = new byte [ CALIBRATION_BYTES ] ; m_Bmp180 . read ( EEPROM_START , bytes , 0 , CALIBRATION_BYTES ) ; final DataInputStream bmp180CaliIn = new DataInputStream ( new ByteArrayInputStream ( bytes ) ) ; m_CalibrationData = new int [ CALIBRATION_SIZE ] ; for ( int i = 0 ; i < m_CalibrationData . length ; i ++ ) { if ( CALIBRATION_ARRAY_AC4 <= i && i <= CALIBRATION_ARRAY_AC6 ) { m_CalibrationData [ i ] = bmp180CaliIn . readUnsignedShort ( ) ; } else { if ( i == CALIBRATION_ARRAY_MB ) { bmp180CaliIn . readShort ( ) ; m_CalibrationData [ i ] = bmp180CaliIn . readShort ( ) ; } else { m_CalibrationData [ i ] = bmp180CaliIn . readShort ( ) ; } } } }
Reads the calibration data from the BMP180 sensor.
Reads the calibration data from the BMP180 sensor .