管壳码全0判断

This commit is contained in:
ranchuan
2023-07-07 18:26:15 +08:00
parent ec758c356b
commit f148347e58
11 changed files with 904 additions and 48 deletions

View File

@@ -159,20 +159,20 @@ uint8_t coder_judge(const uint8_t *data)
}
// 检测电流
TASK_FIND_NEXT(4);
TASK_FIND_NEXT(3);
temp=TASK_DATA(0);
temp2=TASK_DATA(1);
if((temp<10)&&(temp2<10))
if((temp<100)&&(temp2<100))
{
// 接触异常
return 3;
}
else if(((temp>task->range[0].max)&&(temp<1500))||
((temp2>task->range[0].max)&&(temp2<1500)))
else if(((temp>task->range[0].max)&&(temp<800))||
((temp2>task->range[0].max)&&(temp2<800)))
{
// 过流
return 7;
}else if((temp>1500)&&(temp2>1500))
}else if((temp>800)&&(temp2>800))
{
// 短路
return 8;
@@ -180,7 +180,7 @@ uint8_t coder_judge(const uint8_t *data)
// 检测uid
TASK_FIND_NEXT(5);
TASK_FIND_NEXT(4);
if(get_ack(data,task->taskindex))
{
// 芯片错误
@@ -188,7 +188,7 @@ uint8_t coder_judge(const uint8_t *data)
}
// 检测桥丝
TASK_FIND_NEXT(6);
TASK_FIND_NEXT(11);
temp=TASK_DATA(0);
if((temp<task->range[0].min)||(temp>task->range[0].max))
{

View File

@@ -87,6 +87,8 @@ int check_shell_code(const char *shell_code)
if(shell_code[i]==0)
return 0;
}
if(strncmp("0000000000000",shell_code,13)==0)
return 0;
return 1;
}