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:
commit
6a92bf39b4
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 */
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue