Update main.cpp

added: CWA-handling
This commit is contained in:
August Quint 2020-09-01 11:56:21 +02:00 committed by GitHub
parent e9800db481
commit c15d8cb893
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -312,9 +312,25 @@ void setup() {
// initialize sensors // initialize sensors
#if (HAS_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(); sensor_init();
#endif #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 // initialize LoRa
#if (HAS_LORA) #if (HAS_LORA)
@ -336,7 +352,7 @@ void setup() {
assert(mqtt_init() == ESP_OK); assert(mqtt_init() == ESP_OK);
#endif #endif
#ifdef HAS_SDCARD #if (HAS_SDCARD)
if (sdcard_init()) if (sdcard_init())
strcat_P(features, " SD"); strcat_P(features, " SD");
#endif #endif