barometer: fixed for purple build

This commit is contained in:
Andrew Tridgell 2011-11-13 20:10:54 +11:00 committed by Pat Hickey
parent e3a74626d6
commit 2259bacd67

View File

@ -154,13 +154,13 @@ uint8_t APM_BMP085_Class::Read()
uint8_t result = 0; uint8_t result = 0;
if (BMP085_State == 1){ if (BMP085_State == 1){
if (digitalRead(BMP085_EOC)){ if (BMP_DATA_READY()){
BMP085_State = 2; BMP085_State = 2;
ReadTemp(); // On state 1 we read temp ReadTemp(); // On state 1 we read temp
Command_ReadPress(); Command_ReadPress();
} }
}else{ }else{
if (digitalRead(BMP085_EOC)){ if (BMP_DATA_READY()){
BMP085_State = 1; // Start again from state = 1 BMP085_State = 1; // Start again from state = 1
ReadPress(); ReadPress();
Calculate(); Calculate();