添加任务插槽,未写完
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "CheckerExt.h"
|
||||
#include "basechecker.h"
|
||||
#include "elec_det.h"
|
||||
#include "elec_task_slot.h"
|
||||
|
||||
|
||||
|
||||
@@ -117,7 +118,57 @@ static int calc_skip_num(int index)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*rc{
|
||||
执行动态插入的任务,
|
||||
找到此插槽的所有动态任务并依次执行,如未找到则直接返回
|
||||
par0:要执行的任务插槽
|
||||
return:无
|
||||
exe:动态插入的任务执行失败则此任务失败
|
||||
}*/
|
||||
void CheckerExt_Slot(void)
|
||||
{
|
||||
int index;
|
||||
uint16_t ret=0;
|
||||
int self_index=checker_runcfg.task_info.runindex;
|
||||
if(checker_runcfg.param_count<1){
|
||||
ret=1;
|
||||
goto end;
|
||||
}
|
||||
index=checker_runcfg.params[0];
|
||||
task_def *t=0;
|
||||
void *task_slot=task_slot_init();
|
||||
if(task_slot==0){
|
||||
goto end;
|
||||
}
|
||||
if(elec_task_env_back()){
|
||||
ret=2;
|
||||
goto end;
|
||||
}
|
||||
while(t=task_slot_next(task_slot,(uint8_t)index),t){
|
||||
// t->
|
||||
}
|
||||
if(elec_task_env_restore()){
|
||||
ret=5;
|
||||
goto end;
|
||||
}
|
||||
end:
|
||||
Checker_MaskResult(ret,self_index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CheckerTask exttaskArray[CHECKER_EXTID_COUNT]={
|
||||
CheckerExt_CalcErr,
|
||||
CheckerExt_Repeat,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user