mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 13:08:13 +08:00
初始化HA插座状态
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "mico.h"
|
||||
#include "micokit_ext.h"
|
||||
|
||||
#define VERSION "v1.0.13"
|
||||
#define VERSION "v1.0.14"
|
||||
|
||||
#define TYPE 1
|
||||
#define TYPE_NAME "zTC1"
|
||||
|
||||
@@ -254,6 +254,12 @@ void MqttClientThread(mico_thread_arg_t arg)
|
||||
/*4.1 连接成功后先更新发送一次数据*/
|
||||
isconnect = true;
|
||||
|
||||
int i = 0;
|
||||
for (; i < SOCKET_NUM; i++)
|
||||
{
|
||||
UserMqttSendSocketState(i);
|
||||
}
|
||||
|
||||
mico_init_timer(&timer_handle, 150, UserMqttTimerFunc, &arg);
|
||||
mico_start_timer(&timer_handle);
|
||||
/* 5. client loop for recv msg && keepalive */
|
||||
|
||||
Reference in New Issue
Block a user