添加写三码验三码任务,实现0x20任务,完成任务插槽机制
添加文件 tran_for_broadcast.c
This commit is contained in:
@@ -411,14 +411,13 @@ static int elec_code_load_param(array_def *uid_psw)
|
||||
}
|
||||
|
||||
// 检测 准备参数
|
||||
CheckerTask elec_get_task_fun(CheckerTask *tasks_fun_table[],uint8_t chip_type,uint8_t taskid);
|
||||
int elec_check_load_task_param(uint8_t task_index)
|
||||
{
|
||||
self_def *s=&g_self;
|
||||
uint8_t taskid;
|
||||
CheckerTask_Info_st *task_par;
|
||||
taskid=s->taskid_table[task_index];
|
||||
s->task_fun=elec_get_task_fun(s->tasks_fun_table,s->chip_type,taskid);
|
||||
s->task_fun=elec_get_task_fun(taskid);
|
||||
task_par= s->task_info_array[task_index];
|
||||
memset(&checker_runcfg.task_info,0,sizeof(CheckerTask_Info_st));
|
||||
memset(checker_runcfg.params,0,20);
|
||||
@@ -490,9 +489,12 @@ int elec_task_env_restore(void)
|
||||
|
||||
|
||||
// 根据任务id获取检测函数
|
||||
CheckerTask elec_get_task_fun(CheckerTask *tasks_fun_table[],uint8_t chip_type,uint8_t taskid)
|
||||
CheckerTask elec_get_task_fun(uint8_t taskid)
|
||||
{
|
||||
self_def *s=&g_self;
|
||||
CheckerTask task_fun=0;
|
||||
CheckerTask **tasks_fun_table=s->tasks_fun_table;
|
||||
uint8_t chip_type=s->chip_type;
|
||||
if(taskid<CHECKER_MAXID_COUNT){
|
||||
task_fun=tasks_fun_table[chip_type][taskid];
|
||||
}else if((taskid>=CHECKER_MAXID_COUNT)&&
|
||||
@@ -500,6 +502,7 @@ CheckerTask elec_get_task_fun(CheckerTask *tasks_fun_table[],uint8_t chip_type,u
|
||||
{
|
||||
task_fun=exttaskArray[taskid-CHECKER_MAXID_COUNT];
|
||||
}
|
||||
s->task_fun=task_fun;
|
||||
return task_fun;
|
||||
}
|
||||
|
||||
@@ -520,9 +523,22 @@ void elec_exe_task(void)
|
||||
if(checker_runcfg.excue_rtv==0)
|
||||
break;
|
||||
}
|
||||
char *str=malloc(200);
|
||||
int str_len=0;
|
||||
for(int i=0;i<checker_runcfg.rtv_count;i++)
|
||||
{
|
||||
str_len+=sprintf(str+str_len,"%d,",checker_runcfg.Test_Rtv[checker_runcfg.rtv_index+i]);
|
||||
}
|
||||
checker_runcfg.rtv_index+=checker_runcfg.rtv_count;
|
||||
DBG_LOG("task_index:%d,taskid:%d,ret=%d,rtv_index=%d.",s->task_index,
|
||||
s->task_par->taskid,checker_runcfg.excue_rtv,checker_runcfg.rtv_index);
|
||||
if(checker_runcfg.rtv_count>0){
|
||||
DBG_LOG("task_index:%d,taskid:%d,ret=%d,rtv_index=%d.",s->task_index,
|
||||
s->task_par->taskid,checker_runcfg.excue_rtv,checker_runcfg.rtv_index);
|
||||
DBG_LOG("rets:%s\n",str);
|
||||
}else{
|
||||
DBG_LOG("task_index:%d,taskid:%d,ret=%d,rtv_index=%d.\n",s->task_index,
|
||||
s->task_par->taskid,checker_runcfg.excue_rtv,checker_runcfg.rtv_index);
|
||||
}
|
||||
free(str);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "stdint.h"
|
||||
#include "bytearray.h"
|
||||
|
||||
#include "interface/basechecker.h"
|
||||
|
||||
int elec_init(void);
|
||||
|
||||
@@ -48,6 +48,8 @@ int elec_task_env_back(void);
|
||||
|
||||
int elec_task_env_restore(void);
|
||||
|
||||
CheckerTask elec_get_task_fun(uint8_t taskid);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include "mystring.h"
|
||||
#include "elec_judge.h"
|
||||
#include "interface/CheckerExt.h"
|
||||
#include "elec_task_slot.h"
|
||||
|
||||
|
||||
// 通用异常判定逻辑
|
||||
@@ -354,6 +355,19 @@ int elec_report_err(elec_judge_def *e)
|
||||
}
|
||||
|
||||
|
||||
static void elec_add_slot_err(elec_judge_def *e)
|
||||
{
|
||||
void *slot=task_slot_init();
|
||||
int len=0;
|
||||
uint8_t *table=0;
|
||||
len=task_slot_err_table(slot,&table);
|
||||
for(int i=0;i<len;i++)
|
||||
{
|
||||
elec_add_errcode(e,table[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 异常判断
|
||||
// task_num,要判断的任务数
|
||||
@@ -391,6 +405,9 @@ void elec_judge(elec_judge_def *e,int task_num,uint8_t *exe_ack,
|
||||
}
|
||||
data+=task->item_num*2;
|
||||
}
|
||||
|
||||
elec_add_slot_err(e);
|
||||
|
||||
DBG_LOG("err_table:%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x",
|
||||
e->err_list[0],e->err_list[1],e->err_list[2],e->err_list[3],e->err_list[4],
|
||||
e->err_list[5],e->err_list[6],e->err_list[7],e->err_list[8],e->err_list[9]
|
||||
|
@@ -57,6 +57,7 @@ void *task_slot_init(void)
|
||||
t=calloc(1,sizeof(task_slot_def));
|
||||
app_variable("task_slot",t,0);
|
||||
}
|
||||
t->current=t->head;
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -90,18 +91,35 @@ task_def *task_slot_next(void *context,uint8_t slot_index)
|
||||
if(t==0){
|
||||
return 0;
|
||||
}
|
||||
task_node *n;
|
||||
while(t->current){
|
||||
n=t->current;
|
||||
t->current=n->next;
|
||||
if(n->task.slot_index==slot_index){
|
||||
return &n->task;
|
||||
task_def *n;
|
||||
while(n=task_slot_next_item(t),n!=0){
|
||||
if(n->slot_index==slot_index){
|
||||
return n;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// 找到下一个
|
||||
task_def *task_slot_next_item(void *context)
|
||||
{
|
||||
task_slot_def *t=context;
|
||||
if(t==0){
|
||||
return 0;
|
||||
}
|
||||
task_node *n=0;
|
||||
if(t->current){
|
||||
n=t->current;
|
||||
t->current=n->next;
|
||||
return &n->task;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int task_slot_add_err(void *context,uint8_t err)
|
||||
{
|
||||
task_slot_def *t=context;
|
||||
@@ -127,4 +145,16 @@ int task_slot_add_err(void *context,uint8_t err)
|
||||
|
||||
|
||||
|
||||
// 获取异常代码表
|
||||
int task_slot_err_table(void *context,uint8_t **table)
|
||||
{
|
||||
task_slot_def *t=context;
|
||||
if(t==0){
|
||||
return 0;
|
||||
}
|
||||
if(table) *table=t->err_table;
|
||||
return t->err_num;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -11,6 +11,7 @@ typedef struct{
|
||||
uint8_t par_count;// 参数个数
|
||||
uint8_t ret_count;// 返回值个数
|
||||
uint8_t errcode;
|
||||
uint8_t task_index;
|
||||
uint8_t params[20];
|
||||
uint8_t rets[20];
|
||||
}task_def;
|
||||
@@ -18,12 +19,17 @@ typedef struct{
|
||||
|
||||
void *task_slot_init(void);
|
||||
|
||||
void task_slot_delete(void);
|
||||
|
||||
int task_slot_add_item(void *context,task_def *item);
|
||||
|
||||
task_def *task_slot_next(void *context,uint8_t slot_index);
|
||||
|
||||
task_def *task_slot_next_item(void *context);
|
||||
|
||||
int task_slot_add_err(void *context,uint8_t err);
|
||||
|
||||
int task_slot_err_table(void *context,uint8_t **table);
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -119,6 +119,26 @@ static int calc_skip_num(int index)
|
||||
|
||||
|
||||
|
||||
/*rc{
|
||||
设置UID和密码到小板内存,三码绑定函数使用此数据
|
||||
输入参数[0]=uid长度,[1]=pwd长度,[uid][pwd]
|
||||
}*/
|
||||
void CheckerExt_SetUID(void)
|
||||
{
|
||||
uint8_t pwd_len=0,uid_len=0;
|
||||
uint8_t *uid_psw=(uint8_t *)checker_runcfg.params;
|
||||
uint8_t ret=0;
|
||||
uid_len = uid_psw[0];
|
||||
pwd_len = uid_psw[1];
|
||||
if(uid_len==0||pwd_len==0){
|
||||
ret=1;
|
||||
}
|
||||
checker_runcfg.uid_len=uid_len;
|
||||
checker_runcfg.pwd_len=pwd_len;
|
||||
memcpy(checker_runcfg.writeuid,uid_psw+2,uid_len);
|
||||
memcpy(checker_runcfg.writepwd,uid_psw+2+uid_len,pwd_len);
|
||||
Checker_MaskResult(ret,checker_runcfg.task_info.runindex);
|
||||
}
|
||||
|
||||
|
||||
/*rc{
|
||||
@@ -132,9 +152,11 @@ void CheckerExt_Slot(void)
|
||||
{
|
||||
int index;
|
||||
uint16_t ret=0;
|
||||
uint16_t exe_ret=0;
|
||||
int self_index=checker_runcfg.task_info.runindex;
|
||||
task_def *t=0;
|
||||
void *task_slot=0;
|
||||
CheckerTask fun=0;
|
||||
if(checker_runcfg.param_count<1){
|
||||
ret=1;
|
||||
goto end;
|
||||
@@ -149,12 +171,37 @@ void CheckerExt_Slot(void)
|
||||
goto end;
|
||||
}
|
||||
while(t=task_slot_next(task_slot,(uint8_t)index),t){
|
||||
// t->
|
||||
memset(&checker_runcfg.task_info,0,sizeof(CheckerTask_Info_st));
|
||||
memset(checker_runcfg.params,0,20);
|
||||
checker_runcfg.param_count = 0;//参数个数
|
||||
checker_runcfg.rtv_count = 0;//返回值个数
|
||||
checker_runcfg.excue_rtv = 0;
|
||||
checker_runcfg.task_info.retry_time = 0;
|
||||
|
||||
checker_runcfg.task_info.runindex=self_index;
|
||||
checker_runcfg.param_count = t->par_count;
|
||||
checker_runcfg.rtv_count = t->ret_count;
|
||||
memcpy(checker_runcfg.params,t->params,checker_runcfg.param_count*2);
|
||||
fun=elec_get_task_fun(t->task_id);
|
||||
checker_runcfg.excue_rtv=1;
|
||||
if(fun){
|
||||
fun();
|
||||
checker_runcfg.rtv_index-=checker_runcfg.rtv_count;
|
||||
}
|
||||
exe_ret|=checker_runcfg.excue_rtv;
|
||||
memcpy(t->rets,&checker_runcfg.Test_Rtv[checker_runcfg.rtv_index],checker_runcfg.rtv_count*2);
|
||||
memset(&checker_runcfg.Test_Rtv[checker_runcfg.rtv_index],0,checker_runcfg.rtv_count*2);
|
||||
if(checker_runcfg.excue_rtv){
|
||||
task_slot_add_err(task_slot,t->errcode);
|
||||
}
|
||||
}
|
||||
if(elec_task_env_restore()){
|
||||
ret=5;
|
||||
ret=3;
|
||||
goto end;
|
||||
}
|
||||
if(exe_ret){
|
||||
ret=4;
|
||||
}
|
||||
end:
|
||||
Checker_MaskResult(ret,self_index);
|
||||
}
|
||||
|
@@ -19,7 +19,9 @@ void CheckerExt_CalcErr(void);
|
||||
|
||||
void CheckerExt_Repeat(void);
|
||||
|
||||
void CheckerExt_SetUID(void);
|
||||
|
||||
void CheckerExt_Slot(void);
|
||||
|
||||
|
||||
|
||||
|
@@ -353,7 +353,7 @@ void EW_Test_VerifyThreedCode(void)
|
||||
}
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(uc_rtv,checker_runcfg.task_info.runindex);
|
||||
Checker_MaskResult(1,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
EW_ReadMTP(checker_runcfg.netid,0x20,EW_RunBuf,checker_runcfg.uid_len+1);
|
||||
@@ -367,7 +367,7 @@ void EW_Test_VerifyThreedCode(void)
|
||||
}
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(uc_rtv,checker_runcfg.task_info.runindex);
|
||||
Checker_MaskResult(2,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ void EW_Test_VerifyThreedCode(void)
|
||||
}
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(uc_rtv,checker_runcfg.task_info.runindex);
|
||||
Checker_MaskResult(3,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
EW_ReadMTP(checker_runcfg.netid,0x24,EW_RunBuf,checker_runcfg.pwd_len+1);
|
||||
@@ -397,7 +397,7 @@ void EW_Test_VerifyThreedCode(void)
|
||||
}
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(uc_rtv,checker_runcfg.task_info.runindex);
|
||||
Checker_MaskResult(4,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -409,30 +409,34 @@ void EW_Test_VerifyThreedCode(void)
|
||||
}
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(uc_rtv,checker_runcfg.task_info.runindex);
|
||||
Checker_MaskResult(5,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
//验证PWD
|
||||
memcpy(EW_RunBuf,EW_Test_PWD,checker_runcfg.pwd_len);
|
||||
delay_ms(200);
|
||||
uc_rtv = EW_VerfyPWD(checker_runcfg.netid,EW_RunBuf,checker_runcfg.pwd_len);
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(uc_rtv,checker_runcfg.task_info.runindex);
|
||||
Checker_MaskResult(6,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
//读状态
|
||||
delay_ms(200);
|
||||
uc_rtv = EW_ReadState(checker_runcfg.netid,(uint8_t*)state.datas);
|
||||
if(uc_rtv > 0 || state.State_st.erprom_error >0 || state.State_st.pswd_flag == 0)
|
||||
// if(uc_rtv > 0 || state.State_st.erprom_error >0 || state.State_st.pswd_flag == 0)
|
||||
if(uc_rtv > 0 || state.State_st.pswd_flag == 0)
|
||||
{
|
||||
Checker_MaskResult(1,checker_runcfg.task_info.runindex);
|
||||
Checker_MaskResult(7,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
Checker_MaskResult(1,checker_runcfg.task_info.runindex);
|
||||
Checker_MaskResult(0,checker_runcfg.task_info.runindex);
|
||||
}
|
||||
|
||||
/*
|
||||
@brief 自检
|
||||
@param 自检模式
|
||||
@param1 自检时间ms
|
||||
@rtv 自检模式0x08的回读数据
|
||||
*/
|
||||
void EW_Test_CheckSelf()
|
||||
@@ -441,8 +445,9 @@ void EW_Test_CheckSelf()
|
||||
uint32_t ul_temp;
|
||||
uint8_t uc_mode = checker_runcfg.params[0];
|
||||
uc_rtv = EW_ChecSelf(checker_runcfg.netid,uc_mode,(uint8_t*)&ul_temp);
|
||||
delay_ms(checker_runcfg.params[1]);
|
||||
Checker_MaskResult(uc_rtv,checker_runcfg.task_info.runindex);
|
||||
|
||||
Checker_SetRtv((uint16_t*)ul_temp,checker_runcfg.rtv_count);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -702,9 +707,9 @@ void EW_Test_EnBoom(void)
|
||||
}
|
||||
/*
|
||||
@brief 起爆
|
||||
@param0 采样超时
|
||||
@param1 起爆电流AD
|
||||
@param2 延迟采样
|
||||
@param0 采样超时 0.01ms
|
||||
@param1 起爆电流AD
|
||||
@param2 延迟采样ms
|
||||
*/
|
||||
|
||||
void EW_Test_Boom()
|
||||
@@ -814,6 +819,147 @@ void EW_Test_PowerOFF(void)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@brief 写三码数据
|
||||
*/
|
||||
void EW_Test_WriteUID(void)
|
||||
{
|
||||
uint8_t uc_rtv = 0;
|
||||
if(JQXT_Test_IsNeedBind() == 0)
|
||||
{
|
||||
Checker_MaskResult(0,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(EW_RunBuf,checker_runcfg.writeuid,checker_runcfg.uid_len);
|
||||
EW_RunBuf[checker_runcfg.uid_len] = CheckCRC_8(EW_RunBuf,checker_runcfg.uid_len);
|
||||
uc_rtv |= EW_WriteMTP(checker_runcfg.netid,0x00,EW_RunBuf,checker_runcfg.uid_len+1);
|
||||
delay_os_ms(50);
|
||||
uc_rtv |= EW_WriteMTP(checker_runcfg.netid,0x20,EW_RunBuf,checker_runcfg.uid_len+1);
|
||||
delay_os_ms(50);
|
||||
memcpy(EW_RunBuf,checker_runcfg.writepwd,checker_runcfg.pwd_len);
|
||||
EW_RunBuf[checker_runcfg.pwd_len] = CheckCRC_8(EW_RunBuf,checker_runcfg.pwd_len);
|
||||
uc_rtv |= EW_WriteMTP(checker_runcfg.netid,0x04,EW_RunBuf,checker_runcfg.pwd_len+1);
|
||||
delay_os_ms(50);
|
||||
uc_rtv |= EW_WriteMTP(checker_runcfg.netid,0x24,EW_RunBuf,checker_runcfg.pwd_len+1);
|
||||
|
||||
Checker_MaskResult(uc_rtv,checker_runcfg.task_info.runindex);
|
||||
}
|
||||
|
||||
/*
|
||||
@breif 验证写入的三码数据
|
||||
*/
|
||||
void EW_Test_VerifyUID(void)
|
||||
{
|
||||
uint8_t uc_rtv = 0;
|
||||
System_State_un state;
|
||||
//读UID MTP
|
||||
memset(EW_RunBuf,0,sizeof(EW_RunBuf));
|
||||
EW_ReadMTP(checker_runcfg.netid,0x00,EW_RunBuf,checker_runcfg.uid_len+1);
|
||||
if(EW_RunBuf[checker_runcfg.uid_len] != CheckCRC_8(EW_RunBuf,checker_runcfg.uid_len))
|
||||
{
|
||||
uc_rtv = 1;
|
||||
}
|
||||
if(0 != memcmp(EW_RunBuf,checker_runcfg.writeuid,checker_runcfg.uid_len))
|
||||
{
|
||||
uc_rtv = 1;
|
||||
}
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(1,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
memset(EW_RunBuf,0,sizeof(EW_RunBuf));
|
||||
EW_ReadMTP(checker_runcfg.netid,0x20,EW_RunBuf,checker_runcfg.uid_len+1);
|
||||
if(EW_RunBuf[checker_runcfg.uid_len] != CheckCRC_8(EW_RunBuf,checker_runcfg.uid_len))
|
||||
{
|
||||
uc_rtv = 1;
|
||||
}
|
||||
if(0 != memcmp(EW_RunBuf,checker_runcfg.writeuid,checker_runcfg.uid_len))
|
||||
{
|
||||
uc_rtv = 1;
|
||||
}
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(2,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
|
||||
//读PWD MTP
|
||||
memset(EW_RunBuf,0,sizeof(EW_RunBuf));
|
||||
EW_ReadMTP(checker_runcfg.netid,0x04,EW_RunBuf,checker_runcfg.pwd_len+1);
|
||||
if(EW_RunBuf[checker_runcfg.pwd_len] != CheckCRC_8(EW_RunBuf,checker_runcfg.pwd_len))
|
||||
{
|
||||
uc_rtv = 1;
|
||||
}
|
||||
if(0 != memcmp(EW_RunBuf,checker_runcfg.writepwd,checker_runcfg.pwd_len))
|
||||
{
|
||||
uc_rtv = 1;
|
||||
}
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(3,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
memset(EW_RunBuf,0,sizeof(EW_RunBuf));
|
||||
EW_ReadMTP(checker_runcfg.netid,0x24,EW_RunBuf,checker_runcfg.pwd_len+1);
|
||||
if(EW_RunBuf[checker_runcfg.pwd_len] != CheckCRC_8(EW_RunBuf,checker_runcfg.pwd_len))
|
||||
{
|
||||
uc_rtv = 1;
|
||||
}
|
||||
if(0 != memcmp(EW_RunBuf,checker_runcfg.writepwd,checker_runcfg.pwd_len))
|
||||
{
|
||||
uc_rtv = 1;
|
||||
}
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(4,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
|
||||
//读UID
|
||||
memset(EW_RunBuf,0,sizeof(EW_RunBuf));
|
||||
uc_rtv = EW_ReadUID(checker_runcfg.netid,EW_RunBuf,checker_runcfg.uid_len);
|
||||
if(0 != memcmp(EW_RunBuf,checker_runcfg.writeuid,checker_runcfg.uid_len))
|
||||
{
|
||||
uc_rtv = 1;
|
||||
}
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(5,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
//验证PWD
|
||||
memcpy(EW_RunBuf,checker_runcfg.writepwd,checker_runcfg.pwd_len);
|
||||
delay_ms(200);
|
||||
uc_rtv = EW_VerfyPWD(checker_runcfg.netid,EW_RunBuf,checker_runcfg.pwd_len);
|
||||
if(uc_rtv > 0)
|
||||
{
|
||||
Checker_MaskResult(6,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
//读状态
|
||||
delay_ms(200);
|
||||
uc_rtv = EW_ReadState(checker_runcfg.netid,(uint8_t*)state.datas);
|
||||
// if(uc_rtv > 0 || state.State_st.erprom_error >0 || state.State_st.pswd_flag == 0)
|
||||
if(uc_rtv > 0 || state.State_st.pswd_flag == 0)
|
||||
{
|
||||
Checker_MaskResult(7,checker_runcfg.task_info.runindex);
|
||||
return;
|
||||
}
|
||||
Checker_MaskResult(0,checker_runcfg.task_info.runindex);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void EW_Empty(void)
|
||||
{
|
||||
Checker_RunCfg_st *cfg=&checker_runcfg;
|
||||
@@ -863,6 +1009,10 @@ EW_Updata, //27 升级
|
||||
EW_Test_ChgEnergy, //28 充能统计
|
||||
CheckerExt_CalcErr, //29 计算异常
|
||||
CheckerExt_Repeat, //30 重新执行一次指定任务
|
||||
EW_Test_WriteUID, //31 写入三码数据
|
||||
EW_Test_VerifyUID, //32 验证三码数据
|
||||
CheckerExt_SetUID, //33 配置三码数据到小板
|
||||
CheckerExt_Slot, //34 任务插槽
|
||||
(void*)0 //数组结束
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user