mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
[bmp085] Fix calibration reading with errors
This commit is contained in:
committed by
Gautier Hattenberger
parent
6629c15881
commit
8bbe5268a0
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user