Subversion Repositories Code-Repo

Rev

Rev 155 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 155 Rev 157
Line 93... Line 93...
93
    UT = BMP_Read_Raw_Temperature();
93
    UT = BMP_Read_Raw_Temperature();
94
    UP = BMP_Read_Raw_Pressure();
94
    UP = BMP_Read_Raw_Pressure();
95
 
95
 
96
    // Temperature calculations
96
    // Temperature calculations
97
    X1 = ((UT - (long) bmp085_data_p->ac6) * (long) bmp085_data_p->ac5) >> 15;
97
    X1 = ((UT - (long) bmp085_data_p->ac6) * (long) bmp085_data_p->ac5) >> 15;
98
    X2 = ((long) bmp085_data_p->mc << 11) - (X1 + bmp085_data_p->md) / 2; // round up
98
    X2 = ((long) bmp085_data_p->mc << 11);
-
 
99
    X2 -= (X1 + bmp085_data_p->md);
-
 
100
    X2 /= 2; // round up
99
    X2 /= (X1 + bmp085_data_p->md);
101
    X2 /= (X1 + bmp085_data_p->md);
100
    B5 = X1 + X2;
102
    B5 = X1 + X2;
101
 
103
 
102
    // Pressure calcs
104
    // Pressure calcs
103
    B6 = B5 - 4000;
105
    B6 = B5 - 4000;