Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/drivers/barometer/barometer_bmp388.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@
#include "drivers/barometer/barometer.h"
#include "drivers/barometer/barometer_bmp388.h"

#if defined(USE_BARO) && (defined(USE_BARO_BMP388) || defined(USE_BARO_SPI_BMP388))
#if defined(USE_BARO) && (defined(USE_BARO_BMP388) || defined(USE_BARO_SPI_BMP388) || defined(USE_BARO_BMP390) || defined(USE_BARO_SPI_BMP390))

#define BMP388_I2C_ADDR (0x76) // same as BMP280/BMP180
#define BMP388_DEFAULT_CHIP_ID (0x50) // from https://github.com/BoschSensortec/BMP3-Sensor-API/blob/master/bmp3_defs.h#L130
#define BMP390_DEFAULT_CHIP_ID (0x60) // from https://github.com/BoschSensortec/BMP3-Sensor-API/blob/master/bmp3_defs.h#L133

#define BMP388_CMD_REG (0x7E)
#define BMP388_RESERVED_UPPER_REG (0x7D)
Expand Down Expand Up @@ -314,7 +315,7 @@ static bool deviceDetect(busDevice_t * busDev)

bool ack = busReadBuf(busDev, BMP388_CHIP_ID_REG, chipId, nRead);

if (ack && *pId == BMP388_DEFAULT_CHIP_ID) {
if (ack && (*pId == BMP388_DEFAULT_CHIP_ID || *pId == BMP390_DEFAULT_CHIP_ID)) {
return true;
}
};
Expand Down
1 change: 1 addition & 0 deletions src/main/target/common_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ extern uint8_t __config_end;
#define USE_BARO_BMP085
#define USE_BARO_BMP280
#define USE_BARO_BMP388
#define USE_BARO_BMP390
#define USE_BARO_DPS310
#define USE_BARO_LPS25H
#define USE_BARO_MS5607
Expand Down
Loading