add code
This commit is contained in:
parent
5342a1cae3
commit
83c3700694
@ -586,6 +586,21 @@ void Uart::DealRecvData(const char *pData) {
|
||||
int taskID = 0;
|
||||
ScheduleTask scheduleTask;
|
||||
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){
|
||||
mssleep(50000);
|
||||
ModifyDistAddr(ushortAdd);
|
||||
@ -632,6 +647,7 @@ void Uart::DealRecvData(const char *pData) {
|
||||
}
|
||||
break;
|
||||
case WAVE_COMPRESS:
|
||||
|
||||
GetLocalZigbeeRSSI(ushortAdd);
|
||||
DealWaveCompress(pData,ushortAdd);
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user