This commit is contained in:
zhangsheng 2025-05-12 10:34:06 +08:00
parent 5342a1cae3
commit 83c3700694

View File

@ -586,6 +586,21 @@ void Uart::DealRecvData(const char *pData) {
int taskID = 0; int taskID = 0;
ScheduleTask scheduleTask; ScheduleTask scheduleTask;
zlog_info(zct, "shortAdd = %02x%02x,command = %d ",UINT16_HIGH(ushortAdd),UINT16_LOW(ushortAdd),command); zlog_info(zct, "shortAdd = %02x%02x,command = %d ",UINT16_HIGH(ushortAdd),UINT16_LOW(ushortAdd),command);
if (command == WAVE_COMPRESS || command == UPGRADE_ASK)
{
char localtimestamp[32] = {0};
GetTimeNet(localtimestamp, 1);
std::string nowTimetamp = std::string(localtimestamp);
long now_time = atol(nowTimetamp.c_str());
if(ushortAdd == last_short_addr && (now_time - last_time) < 5){
zlog_warn(zct, "DealFeatureValue short_addr_last = %02x%02x,timestamp_last = %ld,nowTime = %ld",UINT16_HIGH(ushortAdd), UINT16_LOW(ushortAdd),last_time,now_time);
return ;
}
GetTimeNet(localtimestamp, 1);
nowTimetamp = std::string(localtimestamp);
last_time = atol(nowTimetamp.c_str());
}
if (ushortAdd != last_short_addr){ if (ushortAdd != last_short_addr){
mssleep(50000); mssleep(50000);
ModifyDistAddr(ushortAdd); ModifyDistAddr(ushortAdd);
@ -632,6 +647,7 @@ void Uart::DealRecvData(const char *pData) {
} }
break; break;
case WAVE_COMPRESS: case WAVE_COMPRESS:
GetLocalZigbeeRSSI(ushortAdd); GetLocalZigbeeRSSI(ushortAdd);
DealWaveCompress(pData,ushortAdd); DealWaveCompress(pData,ushortAdd);
break; break;