Update main.cpp
added: CWA-handling
This commit is contained in:
parent
e9800db481
commit
c15d8cb893
20
src/main.cpp
20
src/main.cpp
@ -312,9 +312,25 @@ void setup() {
|
||||
|
||||
// initialize sensors
|
||||
#if (HAS_SENSORS)
|
||||
strcat_P(features, " SENS");
|
||||
#if (HAS_SENSOR_1)
|
||||
#if (COUNT_CWA)
|
||||
ESP_LOGI(TAG, "init CWA-counter");
|
||||
if ( cwa_init() )
|
||||
strcat_P(features, " CWA");
|
||||
#else
|
||||
strcat_P(features, " SENS(1)");
|
||||
sensor_init();
|
||||
#endif
|
||||
#endif
|
||||
#if (HAS_SENSOR_2)
|
||||
strcat_P(features, " SENS(2)");
|
||||
sensor_init();
|
||||
#endif
|
||||
#if (HAS_SENSOR_3)
|
||||
strcat_P(features, " SENS(3)");
|
||||
sensor_init();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// initialize LoRa
|
||||
#if (HAS_LORA)
|
||||
@ -336,7 +352,7 @@ void setup() {
|
||||
assert(mqtt_init() == ESP_OK);
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SDCARD
|
||||
#if (HAS_SDCARD)
|
||||
if (sdcard_init())
|
||||
strcat_P(features, " SD");
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user