Set timeout of 1s on reads

This commit is contained in:
Pim van Pelt
2018-04-21 23:33:58 +02:00
parent 38fca7c650
commit b2f71583a1
2 changed files with 12 additions and 2 deletions

View File

@ -218,7 +218,7 @@ int main() {
if (!(baro=mgos_barometer_create_i2c(i2c, 0x60, BARO_MPL3115))) {
LOG(LL_ERROR, ("Cannot create barometer"));
} else {
mgos_barometer_set_cache_ttl(baro, 0);
mgos_barometer_set_cache_ttl(baro, 1000);
}
for (;;) {