Add DHT temp/humidity getters.
+float mgos_prometheus_sensors_dht_get_temp(uint8_t idx); +float mgos_prometheus_sensors_dht_get_humidity(uint8_t idx); They return NAN if the index is invalid, or the sensor couldn't be found. Otherwise, they return the last measured temperature or humidity values as floats.
This commit is contained in:
@ -4,4 +4,7 @@
|
||||
#include "mgos.h"
|
||||
#include "mgos_gpio.h"
|
||||
|
||||
float mgos_prometheus_sensors_dht_get_temp(uint8_t idx);
|
||||
float mgos_prometheus_sensors_dht_get_humidity(uint8_t idx);
|
||||
|
||||
#endif // __MGOS_PROMETHEUS_SENSORS_H
|
||||
|
Reference in New Issue
Block a user