修复了ota和tag search线程cpu总是占用百分百的问题

This commit is contained in:
zzh 2025-06-12 14:44:55 +08:00
parent 141bcbcaa3
commit 170c437364

9
main.c
View File

@ -1197,16 +1197,16 @@ void *thread_tag_search_send(void *arg){
prctl(PR_SET_NAME, "tag_search");
while(1){
if(isSearchLabelOn){
//uart_data_send_head_search(&uartSend,5);
sleep(10);
searchTimeNew=getCurrentTime();
//LOG_I("searchTimeNew:%d\n",searchTimeNew);
if((searchTimeNew-searchTimeOld)>=(searchTimeOut-20)){
isSearchReport=true;
search_tag_report();
isSearchReport=false;
isSearchLabelOn=false;
}
} else {
usleep(100000); // 休眠100ms
}
}
}
@ -1217,10 +1217,9 @@ void *thread_do_ota(void *arg){
if(isOtaEnable && isSendComEnd && !isLEDOtaSuccess){
sleep(1);
otaLeds();
} else {
usleep(100000); // 休眠100ms
}
//if(isOtaEnable && isSendComEnd && !isAPOtaSuccess){
// otaAp();
//}
}
}