广播命令时静默

This commit is contained in:
ranchuan
2023-11-15 18:11:39 +08:00
parent 1708b9ce6a
commit 83e6717fe8
12 changed files with 136 additions and 16 deletions

View File

@@ -280,6 +280,8 @@ void protu_reply_call(protu_def *p,array_def *data)
{
param_check(p);
array_def *t=0;
if(p->silent)
return;
if(p->codec)
t=p->codec->encode(p,data);
// DBG_LOG("send encode:%s",arr_string(t));
@@ -294,6 +296,8 @@ void protu_reply_call(protu_def *p,array_def *data)
void protu_send_call(protu_def *p,uint8_t cmd,array_def *data)
{
array_def *t=0;
if(p->silent)
return;
if(cmd!=0){
p->cmd=cmd;
// 上报数据不增加流水号 2023.7.14
@@ -333,6 +337,7 @@ array_def *protu_decode_str(protu_def *p,array_def *data)
p->cmd=0;
if(str_is_print_str((const char *)arr_data(data),arr_length(data))==1)
{
p->silent=0;
arr_append(data,0);
arr_appends_from(r,data);
}else{