first commit

This commit is contained in:
wen
2025-09-30 13:08:23 +08:00
parent ec83999cef
commit 015a4f689d
38 changed files with 628 additions and 593 deletions

View File

@@ -2436,7 +2436,7 @@ static unsigned char dp_download_scene_switch6_6_handle(unsigned short seq_num,c
*****************************************************************************/
static unsigned char dp_download_scene_name_update_handle(unsigned short seq_num,const unsigned char value[], unsigned short length)
{
LOG_I("scene_name_update:%d",length);
LOG_I_LINE("scene_name_update:%d",length);
//示例:当前DP类型为RAW
unsigned char ret;
/*
@@ -2473,7 +2473,7 @@ static unsigned char dp_download_scene_name_update_handle(unsigned short seq_num
校验和 5f
*/
//解析dp
LOG_I("name value dp:%d,font len:%d",value[0],value[1]);
LOG_I_LINE("name value dp:%d,font len:%d",value[0],value[1]);
//区分是设置哪个的
if((value[0]>=24)&&(value[0]<=27))//设置开关的(1~4路)
{//名字和icon都修改
@@ -2481,7 +2481,7 @@ static unsigned char dp_download_scene_name_update_handle(unsigned short seq_num
{
memset(nvs_SysInfo.relay1.Label,0,D_Relay_Label_MAX);
memcpy(nvs_SysInfo.relay1.Label,&value[2],length-2);
LOG_I("switch name:%s",nvs_SysInfo.relay1.Label);
LOG_I_LINE("switch name:%s",nvs_SysInfo.relay1.Label);
}
else if(value[0]==25)//2路
{
@@ -2503,7 +2503,7 @@ static unsigned char dp_download_scene_name_update_handle(unsigned short seq_num
{//名字和icon都修改
memset(nvs_SysInfo.scen_array[value[0]-1].Label ,0,D_Scene_Label_MAX);
memcpy(nvs_SysInfo.scen_array[value[0]-1].Label ,&value[2],length-2);
LOG_I("scene[%d] name:%s",value[0]-1,nvs_SysInfo.scen_array[value[0]-1].Label);
LOG_I_LINE("scene[%d] name:%s",value[0]-1,nvs_SysInfo.scen_array[value[0]-1].Label);
}
else if((value[0]>=142)&&(value[0]<=157))//场景开关142~157
{
@@ -2594,7 +2594,7 @@ static unsigned char dp_download_scene_name_update_handle(unsigned short seq_num
{
memset(nvs_SysInfo.downlights[0].Label,0,D_Downlights_Label_MAX);
memcpy(nvs_SysInfo.downlights[0].Label,&value[2],length-2);
LOG_I("downlights name:%s",nvs_SysInfo.downlights[0].Label);
LOG_I_LINE("downlights name:%s",nvs_SysInfo.downlights[0].Label);
}
else if(value[0]==122)//灯组2
{
@@ -2627,7 +2627,7 @@ static unsigned char dp_download_scene_name_update_handle(unsigned short seq_num
{
memset(nvs_SysInfo.curtains[0].Label,0,D_Curatin_Label_MAX);
memcpy(nvs_SysInfo.curtains[0].Label,&value[2],length-2);
LOG_I("curtains name:%s",nvs_SysInfo.curtains[0].Label);
LOG_I_LINE("curtains name:%s",nvs_SysInfo.curtains[0].Label);
}
else if(value[0]==134)//窗帘组2
{
@@ -2673,13 +2673,13 @@ static unsigned char dp_download_scene_picture_update_handle(unsigned short seq_
{
//示例:当前DP类型为RAW
unsigned char ret;
LOG_I("scene_picture_update %d",length);
LOG_I_LINE("scene_picture_update %d",length);
/*
//RAW type data processing
*/
//解析dp
LOG_I("pic value dp:%d,icon index:%d",value[0],value[2]);
LOG_I_LINE("pic value dp:%d,icon index:%d",value[0],value[2]);
//区分是设置哪个的
if((value[0]>=24)&&(value[0]<=27))//设置开关的(1~4路)
{//app从0开始 t3e-pro从1开始
@@ -2703,7 +2703,7 @@ static unsigned char dp_download_scene_picture_update_handle(unsigned short seq_
else if((value[0]>=1)&&(value[0]<=8))//首屏场景1~8)
{//名字和icon都修改
//nvs_SysInfo.scen_array[value[0]-1].icon=value[2]+1;
//LOG_I("scene[%d] icon:%s",value[0]-1,nvs_SysInfo.scen_array[value[0]-1].icon);
//LOG_I_LINE("scene[%d] icon:%s",value[0]-1,nvs_SysInfo.scen_array[value[0]-1].icon);
}
else if((value[0]>=142)&&(value[0]<=157))//场景开关142~157
{//暂时不改图标

View File

@@ -16,8 +16,11 @@
#include "zigbee.h"
#include "time.h"
#include "gui_guider.h"
#define DBG_TAG "zig_system"
#define DBG_LVL DBG_LOG
#include <rtdbg.h>
extern const DOWNLOAD_CMD_S download_cmd[];
@@ -272,11 +275,11 @@ static unsigned char zigbee_data_point_handle(unsigned short seq_num,const unsig
index = get_dowmload_dpid_index(dp_id);
if(dp_type != download_cmd[index].dp_type){
LOG_I("dp-id type error");
LOG_I_LINE("dp-id type error");
return FALSE;
}
else{
LOG_I("dp:%d-type:%d-seq_num:%d",download_cmd[index].dp_id,download_cmd[index].dp_type,seq_num);
LOG_I_LINE("dp:%d-type:%d-seq_num:%d",download_cmd[index].dp_id,download_cmd[index].dp_type,seq_num);
ret = dp_download_handle(seq_num,dp_id,value + 4,dp_len);
}