[bmp085] Fix calibration reading with errors

This commit is contained in:
Freek van Tienen
2014-05-08 20:08:17 +02:00
committed by Gautier Hattenberger
parent 6629c15881
commit 8bbe5268a0
+1 -1
View File
@@ -72,7 +72,7 @@ static bool_t bmp085_eoc_true(void)
void bmp085_read_eeprom_calib(struct Bmp085* bmp)
{
if (bmp->status == BMP085_STATUS_UNINIT) {
if (bmp->status == BMP085_STATUS_UNINIT && bmp->i2c_trans.status == I2CTransDone) {
bmp->initialized = FALSE;
bmp->i2c_trans.buf[0] = BMP085_EEPROM_AC1;
i2c_transceive(bmp->i2c_p, &(bmp->i2c_trans), bmp->i2c_trans.slave_addr, 1, 22);