添加写三码验三码任务,实现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);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user