mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-13 21:48:25 +08:00
修复LED控制无效的问题
This commit is contained in:
@@ -795,7 +795,7 @@
|
||||
HttpPost("/socket", function (re) {
|
||||
}, sockets_st);
|
||||
HttpPost("/led", function (re) {
|
||||
}, checkboxs[0].checked ? 1 : 0);
|
||||
}, checkboxs[0].checked ? "1" : "0");
|
||||
});
|
||||
//Socket-end
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -245,6 +245,8 @@ void MqttClientThread(mico_thread_arg_t arg)
|
||||
|
||||
mqtt_log("MQTT client connect success!");
|
||||
|
||||
UserLedSet(user_config->power_led_enabled);
|
||||
|
||||
/* 4. mqtt client subscribe */
|
||||
rc = MQTTSubscribe(&c, topic_set, QOS0, MessageArrived);
|
||||
require_noerr_string(rc, MQTT_reconnect, "ERROR: MQTT client subscribe err.");
|
||||
|
||||
@@ -124,7 +124,7 @@ static void WifiLedTimerCallback(void* arg)
|
||||
case WIFI_STATE_CONNECTED:
|
||||
UserLedSet(0);
|
||||
mico_rtos_stop_timer(&wifi_led_timer);
|
||||
if (RelayOut())
|
||||
if (RelayOut()&&user_config->power_led_enabled)
|
||||
UserLedSet(1);
|
||||
else
|
||||
UserLedSet(0);
|
||||
|
||||
Reference in New Issue
Block a user