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:
@ -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;
|
||||
|
Reference in New Issue
Block a user