Add VEML6075 scaffolding.

Also, remove DHT dependency and add a note in mos.yml to have
application owners include those libraries. Without them, we'll compile
no scaffolding. With them, we'll pull those in based on -DHAVE_* macros.
This commit is contained in:
Pim van Pelt
2018-03-21 23:07:04 +01:00
parent d80ba14e03
commit 9cd0681e4d
3 changed files with 74 additions and 1 deletions

View File

@ -3,6 +3,7 @@
#include "mgos_prometheus_sensors.h"
void dht_init();
void veml6075_init();
static void pushgateway_timer(void *user_data) {
mgos_prometheus_metrics_push(MGOS_APP, mgos_sys_config_get_device_id());
@ -11,6 +12,7 @@ static void pushgateway_timer(void *user_data) {
bool mgos_prometheus_sensors_init(void) {
dht_init();
veml6075_init();
if (mgos_sys_config_get_sensors_pushgateway_period()>0)
mgos_set_timer(mgos_sys_config_get_sensors_pushgateway_period()*1000, true, pushgateway_timer, NULL);
return true;