1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 08:45:36 +03:00

Merge pull request #9982 from mikeller/fix_bmp280_detection

Fixed detection of BMP280 / BME280.
This commit is contained in:
Michael Keller 2020-07-20 08:34:17 +12:00 committed by GitHub
commit 6a92bf39b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -163,7 +163,7 @@ bool bmp280Detect(baroDev_t *baro)
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);
if (defaultAddressApplied) {
busdev->busdev_u.i2c.address = 0;