新增芯跳检测脚本
This commit is contained in:
@@ -67,7 +67,13 @@ array_def *protu_decode(protu_def *p,array_def *data)
|
||||
DBG_WARN("recv data check error.h_crc=%02x %02x,crc=%02x %02x",chk_a,chk_b,arr_get(data,-2),arr_get(data,-1));
|
||||
str_set(p->str_err,"recv data check error.");
|
||||
}
|
||||
p->cmd_no=arr_get(data,5)|(arr_get(data,6)<<8);
|
||||
int cmd_no=arr_get(data,5)|(arr_get(data,6)<<8);
|
||||
if(p->cmd_no==cmd_no)
|
||||
{
|
||||
// 重复的cmd_no
|
||||
DBG_WARN("duplicate sequence number.");
|
||||
str_set(p->str_err,"duplicate sequence number.");
|
||||
}
|
||||
p->cmd=arr_get(data,4);
|
||||
// 数据负载
|
||||
arr_delete(r);
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
|
||||
#define BUILD_DATE "2023-07-07 11:16:27"
|
||||
#define BUILD_DATE "2023-07-14 16:23:08"
|
||||
#define SOFT_VERSION "0.10"
|
||||
|
||||
|
||||
|
@@ -280,7 +280,8 @@ void protu_send_call(protu_def *p,uint8_t cmd,array_def *data)
|
||||
array_def *t=0;
|
||||
if(cmd!=0){
|
||||
p->cmd=cmd;
|
||||
p->cmd_no++;
|
||||
// 上报数据不增加流水号 2023.7.14
|
||||
// p->cmd_no++;
|
||||
if(p->codec)
|
||||
t=p->codec->encode(p,data);
|
||||
}else if(p->cmd==0)
|
||||
|
Reference in New Issue
Block a user