diff --git a/main/ZgatewayBT.ino b/main/ZgatewayBT.ino index db0bfd5..9d77aa5 100644 --- a/main/ZgatewayBT.ino +++ b/main/ZgatewayBT.ino @@ -580,7 +580,9 @@ void coreTask(void *pvParameters) if (low_power_mode == 2) digitalWrite(LOW_POWER_LED, 1 - LOW_POWER_LED_OFF); BLEscan(); - digitalWrite(LOW_POWER_LED, LOW_POWER_LED_OFF); // to switch off no need of condition + //only change LOW_POWER_LED if low power mode is enabled + if (low_power_mode) + digitalWrite(LOW_POWER_LED, LOW_POWER_LED_OFF); } if(low_power_mode) lowPowerESP32(); diff --git a/platformio.ini b/platformio.ini index 821a602..803876b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -93,6 +93,7 @@ dallastemperature = DallasTemperature m5stickc = M5StickC@0.2.0 m5stack = M5Stack@0.3.0 smartrc-cc1101-driver-lib = SmartRC-CC1101-Driver-Lib@2.3.5 +weatherstationrx = WeatherStationDataRx@0.3.3 [env] framework = arduino @@ -182,6 +183,7 @@ lib_deps = ${libraries.fastled} ${libraries.onewire} ${libraries.dallastemperature} + ${libraries.weatherstationrx} build_flags = ${com-esp.build_flags} '-DZgatewayRF="RF"' @@ -203,6 +205,7 @@ build_flags = '-DZgatewayRFM69="RFM69"' '-DZsensorGPIOInput="GPIOInput"' '-DZsensorGPIOKeyCode="GPIOKeyCode"' + '-DZgatewayWeatherStation="WeatherStation"' '-DsimplePublishing=true' '-DGateway_Name="OpenMQTTGateway_ESP32_ALL"' @@ -374,6 +377,7 @@ lib_deps = ${libraries.fastled} ${libraries.onewire} ${libraries.dallastemperature} + ${libraries.weatherstationrx} build_flags = ${com-esp.build_flags} '-DZgatewayRF="RF"' @@ -397,6 +401,7 @@ build_flags = '-DZgatewayRFM69="RFM69"' '-DZsensorGPIOInput="GPIOInput"' '-DZsensorGPIOKeyCode="GPIOKeyCode"' + '-DZgatewayWeatherStation="WeatherStation"' '-DsimplePublishing=true' '-DGateway_Name="OpenMQTTGateway_ESP8266_ALL"' board_build.flash_mode = dout