This commit is contained in:
zhangsheng 2025-01-24 19:55:37 +08:00
parent 13d79e15f0
commit c34347e43e
2 changed files with 9 additions and 2 deletions

View File

@ -325,6 +325,7 @@ void JsonData::CmtCmd_84(char* filename,char* file_md5,char* send_data,int& sen
std::vector<DataNodeInfo> vecDataNode;
UploadConfigRes upload_condfig_res;
upload_condfig_res.code = 0;
upload_condfig_res.version = 1;
sprintf(upload_condfig_res.message ,"%s","");
send_length = sizeof(UploadConfigRes);
char file_path[64]={0};
@ -430,6 +431,7 @@ void JsonData::CmtCmd_86(char* recv_body,int& count,char* filename,char* file_m
zlog_info(zct,"file_path = %s,file_md5 = %s",filename,file_md5);
UpgradeSensorRes upgrade_sensor_res;
upgrade_sensor_res.code = 0;
upgrade_sensor_res.version = 1;
sprintf(upgrade_sensor_res.message ,"%s","");
send_length = sizeof(UpgradeSensorRes);
char cmd[128]={0};
@ -596,10 +598,11 @@ void JsonData::CmtCmd_88(char* recv_body,int& count,char* send_data,int& send_l
}
}
sprintf(updateSql, " upgradeStatus = %d ", 4);
sprintf(whereCon,"short_addr IN (%s)",short_addr_);
sqlite_db_ctrl::instance().UpdateTableData(" firmware_upgrade ", updateSql,wherecon);
sprintf(wherecon,"zigbeeShortAddr IN (%s)",short_addr_);
sqlite_db_ctrl::instance().UpdateTableData(T_SENSOR_INFO(TNAME), updateSql,wherecon);
UpgradeStopRes upgrade_stop_res;
upgrade_stop_res.code = 0;
upgrade_stop_res.version = 1;
sprintf(upgrade_stop_res.message ,"%s","");
memcpy(send_data,(char*)&upgrade_stop_res,sizeof(UpgradeStopRes));
send_length = sizeof(UpgradeStopRes);

View File

@ -147,6 +147,7 @@ struct UploadConfigReq{
char md5[33];
};
struct UploadConfigRes{
int version;
int code;
char message[64];
};
@ -157,6 +158,7 @@ struct UpgradeGwReq{
};
struct UpgradeGwRes{
int version;
int code;
char message[64];
};
@ -167,6 +169,7 @@ struct UpgradeSensorReq{
char upgrade_short_addr[0];
};
struct UpgradeSensorRes{
int version;
int code;
char message[64];
};
@ -199,6 +202,7 @@ struct UpgradeStopReq{
int short_addr;
};
struct UpgradeStopRes{
int version;
int code;
char message[64];
};