mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Fixed detection of BMP280 / BME280.
This commit is contained in:
parent
1fbd113204
commit
ac7f6b8329
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ bool bmp280Detect(baroDev_t *baro)
|
||||||
|
|
||||||
busReadRegisterBuffer(busdev, BMP280_CHIP_ID_REG, &bmp280_chip_id, 1); /* read Chip Id */
|
busReadRegisterBuffer(busdev, BMP280_CHIP_ID_REG, &bmp280_chip_id, 1); /* read Chip Id */
|
||||||
|
|
||||||
if ((bmp280_chip_id != BMP280_DEFAULT_CHIP_ID) || (bmp280_chip_id != BME280_DEFAULT_CHIP_ID)) {
|
if ((bmp280_chip_id != BMP280_DEFAULT_CHIP_ID) && (bmp280_chip_id != BME280_DEFAULT_CHIP_ID)) {
|
||||||
bmp280BusDeinit(busdev);
|
bmp280BusDeinit(busdev);
|
||||||
if (defaultAddressApplied) {
|
if (defaultAddressApplied) {
|
||||||
busdev->busdev_u.i2c.address = 0;
|
busdev->busdev_u.i2c.address = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue