Some finishing touches.

- Print *_timer_cb consistently (add units "C" and "%" at .2f precision)
- Guard HTU21DF and SI7021 from co-existing (both devices are on the same I2C address)
- Differentiate between BME280 and BMP280 in metrics
- Update README with timing information
- Link in all drivers
This commit is contained in:
Pim van Pelt
2018-04-03 23:57:49 +02:00
parent affa077d61
commit b4b81f7542
8 changed files with 35 additions and 15 deletions

View File

@ -46,7 +46,7 @@ static void dht_timer_cb(void *user_data) {
dht_sensor->temp = mgos_dht_get_temp(dht_sensor->dht);
dht_sensor->humidity = mgos_dht_get_humidity(dht_sensor->dht);
usecs=1000000*(mgos_uptime()-start);
LOG(LL_DEBUG, ("DHT sensor=%u gpio=%u temp=%.2fC humidity=%.0f%% usecs=%u", dht_sensor->idx, dht_sensor->gpio, dht_sensor->temp, dht_sensor->humidity, usecs));
LOG(LL_INFO, ("DHT sensor=%u gpio=%u temperature=%.2fC humidity=%.0f%% usecs=%u", dht_sensor->idx, dht_sensor->gpio, dht_sensor->temp, dht_sensor->humidity, usecs));
}
static bool dht_sensor_create(int pin, enum dht_type type) {