Skip to content

Commit

Permalink
修复不填写mqtt led快闪的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
qlwz committed Jan 7, 2021
1 parent 4c064e1 commit e6694ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/esp_framework/src/Led.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/DC1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit e6694ba

Please sign in to comment.