From e6694bac0c065b569f5cd47cc5c90850007eb6e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=83=85=E7=95=99=E3=83=A1=E8=9A=8A=E5=AD=90?= Date: Thu, 7 Jan 2021 12:32:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E5=A1=AB=E5=86=99mq?= =?UTF-8?q?tt=20led=E5=BF=AB=E9=97=AA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/esp_framework/src/Led.cpp | 2 +- src/DC1.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/esp_framework/src/Led.cpp b/lib/esp_framework/src/Led.cpp index bfb9137..526c11b 100644 --- a/lib/esp_framework/src/Led.cpp +++ b/lib/esp_framework/src/Led.cpp @@ -45,7 +45,7 @@ void Led::loop() } } #ifndef DISABLE_MQTT - else if (!Mqtt::mqttClient.connected()) + else if (globalConfig.mqtt.port != 0 && !Mqtt::mqttClient.connected()) { if (Led::ledType != 1) { diff --git a/src/DC1.cpp b/src/DC1.cpp index 337d640..0dc065f 100644 --- a/src/DC1.cpp +++ b/src/DC1.cpp @@ -62,7 +62,7 @@ void DC1::init() bool DC1::moduleLed() { - if (WiFi.status() == WL_CONNECTED && Mqtt::mqttClient.connected()) + if (WiFi.status() == WL_CONNECTED && (globalConfig.mqtt.port ==0 || Mqtt::mqttClient.connected())) { if (config.wifi_led == 0) {