Small changes

This commit is contained in:
Pim van Pelt
2018-04-22 09:47:58 +02:00
parent 1b3d8ac7ca
commit b9dd5fd2ce
2 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,7 @@ enum mgos_barometer_type {
BARO_NONE = 0,
BARO_MPL115,
BARO_MPL3115,
BARO_BME280
BARO_BME280 // Also BMP280
};
struct mgos_barometer;

View File

@ -14,6 +14,7 @@ bool mgos_barometer_mpl3115_detect(struct mgos_barometer *dev) {
if ((val = mgos_i2c_read_reg_b(dev->i2c, dev->i2caddr, MPL3115_REG_WHOAMI)) < 0) {
return false;
}
LOG(LL_DEBUG, ("whoami=0x%02x", val));
if (val != 0xC4) {
return false;