1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

Fixed detection of BMP280 / BME280.

This commit is contained in:
mikeller 2020-07-06 02:20:09 +12:00
parent 1fbd113204
commit ac7f6b8329

View file

@ -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;