Commit 52cb12b2 authored by 尹佳钦's avatar 尹佳钦

修复复位问题

parent 2ad424a3
...@@ -648,15 +648,23 @@ void kk_dispatch_report_attribute(EmberEUI64 eui64, ...@@ -648,15 +648,23 @@ void kk_dispatch_report_attribute(EmberEUI64 eui64,
kk_zigbee_ctrl_map_t *report_item; kk_zigbee_ctrl_map_t *report_item;
for(i=0;i<PROPERTIES_MAX_NUM;i++){ for(i=0;i<PROPERTIES_MAX_NUM;i++){
device_item = &g_tsl_zigbee_map[i]; device_item = &g_tsl_zigbee_map[i];
report_item = &device_item->zigbee_ctrl; if(device_item != NULL){
report_item = &device_item->zigbee_ctrl;
if(report_item==NULL){
emberAfAppPrintln("not find in map table-2");
return;
}
}else{
emberAfAppPrintln("not find in map table-1");
return;
}
if(device_item==NULL||report_item==NULL) return ;
for(j=0;j<device_item->num;j++){ for(j=0;j<device_item->num;j++){
if(report_item[j].clusterId == clusterId && if(report_item[j].clusterId == clusterId &&
report_item[j].attributeId == attributeId){ report_item[j].attributeId == attributeId){
emberAfAppPrintln("i=%d,j=%d",i,j); emberAfAppPrintln("i=%d,j=%d",i,j);
result = report_item[j].zigbee_report(eui64,EP,clusterId,attributeId,dataType,len,data); if(report_item[j].zigbee_report!=NULL){
result = report_item[j].zigbee_report(eui64,EP,clusterId,attributeId,dataType,len,data);
if(!result){ if(!result){
emberAfAppPrintln("result=%d",result); emberAfAppPrintln("result=%d",result);
emberAfAppPrintln("mac:"); emberAfAppPrintln("mac:");
...@@ -666,6 +674,7 @@ void kk_dispatch_report_attribute(EmberEUI64 eui64, ...@@ -666,6 +674,7 @@ void kk_dispatch_report_attribute(EmberEUI64 eui64,
} }
return ; return ;
} }
}
} }
} }
emberAfAppPrintln("not find report item!!!ep=%d,clu=0x%x,attr=0x%x\n",EP,clusterId,attributeId); emberAfAppPrintln("not find report item!!!ep=%d,clu=0x%x,attr=0x%x\n",EP,clusterId,attributeId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment