From b94dd4dd7433c89d7bbf7a22ffc8377b05c2c829 Mon Sep 17 00:00:00 2001 From: zzh Date: Wed, 11 Jun 2025 16:00:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=EF=BC=8C=E5=87=8F=E5=B0=91=E7=AD=89=E5=BE=85=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/main.c b/main.c index e13dee5..feec5bd 100644 --- a/main.c +++ b/main.c @@ -1790,22 +1790,6 @@ void *thread_mqtt_recv(void *arg){ if(isLightEnable){ mqtt_service_reply(stationsn,mqtt_parm.msg_messageId,"ok",1,productid); - // 先搜索灯带 - LOG_I("Searching for lights...\n"); - isLightOn=false; - isLightOnByRule=false; - isLabelUp=false; - searchTimeOut=120; // 设置搜索超时时间为120秒 - LOG_I("searchTimeOut:%d\n",searchTimeOut); - searchTimeOld=getCurrentTime(); - LOG_I("searchTimeOld:%d\n",searchTimeOld); - isSearchLabelOn=true; - - // 等待搜索完成 - while(isSearchLabelOn && (getCurrentTime() - searchTimeOld) < searchTimeOut) { - usleep(100000); // 休眠100ms - } - // 设置规则并广播点亮 isSendComEnd=false; isLightOn=true; @@ -1824,7 +1808,7 @@ void *thread_mqtt_recv(void *arg){ uart_data_send_head_lightonrule(&uartSend, 5); // 再次广播,提升可靠性 - usleep(500000); // 等待500ms + usleep(100000); // 等待100ms LOG_I("Sending second broadcast\n"); uart_data_send_head_lightonrule(&uartSend, 5); }else{