update to Baro lib to remove temp filtering.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2569 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
jasonshort 2011-06-18 05:08:48 +00:00
parent 0008f268af
commit b70d2d4c29
1 changed files with 41 additions and 44 deletions

View File

@ -187,23 +187,20 @@ void APM_BMP085_Class::Command_ReadTemp()
void APM_BMP085_Class::ReadTemp() void APM_BMP085_Class::ReadTemp()
{ {
byte tmp; byte tmp;
int16_t tmp2;
Wire.beginTransmission(BMP085_ADDRESS); Wire.beginTransmission(BMP085_ADDRESS);
Wire.send(0xF6); Wire.send(0xF6);
Wire.endTransmission(); Wire.endTransmission();
Wire.beginTransmission(BMP085_ADDRESS); Wire.beginTransmission(BMP085_ADDRESS);
Wire.requestFrom(BMP085_ADDRESS, 2); Wire.requestFrom(BMP085_ADDRESS,2);
while(!Wire.available()); // wait while(!Wire.available()); // wait
tmp2 = Wire.receive(); RawTemp = Wire.receive();
while(!Wire.available()); // wait while(!Wire.available()); // wait
tmp = Wire.receive(); tmp = Wire.receive();
tmp2 = tmp2 << 8 | tmp;
if(RawTemp = 0) RawTemp = RawTemp << 8 | tmp;
RawTemp = tmp2;
RawTemp += tmp2;
RawTemp = RawTemp >> 1;
} }
// Calculate Temperature and Pressure in real units. // Calculate Temperature and Pressure in real units.