diff --git a/flight/PiOS/Common/pios_bmp085.c b/flight/PiOS/Common/pios_bmp085.c index dfe75b7f0..850e4d919 100644 --- a/flight/PiOS/Common/pios_bmp085.c +++ b/flight/PiOS/Common/pios_bmp085.c @@ -199,7 +199,8 @@ int32_t PIOS_BMP085_GetPressure(void) int32_t PIOS_BMP085_Read(uint8_t address, uint8_t *buffer, uint8_t len) { /* Try to get the I2C peripheral */ - if(PIOS_I2C_LockDevice(0) < 0) { + if(PIOS_I2C_LockDevice(0) == FALSE) + { /* Request a retry */ return -2; } @@ -233,7 +234,8 @@ int32_t PIOS_BMP085_Read(uint8_t address, uint8_t *buffer, uint8_t len) int32_t PIOS_BMP085_Write(uint8_t address, uint8_t buffer) { /* Try to get the IIC peripheral */ - if(PIOS_I2C_LockDevice(0) < 0) { + if(PIOS_I2C_LockDevice(0) == FALSE) + { /* Request a retry */ return -2; }