Add MPL3115 driver; It's a bit slow (takes ~1s for DataReady to be set), should take a look

This commit is contained in:
Pim van Pelt
2018-04-21 23:18:43 +02:00
parent f4aa4f7844
commit 38fca7c650
4 changed files with 114 additions and 22 deletions

View File

@ -215,8 +215,8 @@ int main() {
mgos_mpu9250_set_magnetometer_speed(mpu9250, MAG_100_HZ);
}
*/
if (!(baro=mgos_barometer_create_i2c(i2c, 0x60, BARO_MPL115))) {
LOG(LL_ERROR, ("Cannot create MPL115 barometer"));
if (!(baro=mgos_barometer_create_i2c(i2c, 0x60, BARO_MPL3115))) {
LOG(LL_ERROR, ("Cannot create barometer"));
} else {
mgos_barometer_set_cache_ttl(baro, 0);
}