添加自动测试命令 auto_test

V2.03 批检仪检测指令使用小板的错误码
This commit is contained in:
ranchuan
2024-01-04 18:12:42 +08:00
parent 78b3a839fd
commit 307eb513ef
8 changed files with 86 additions and 22 deletions

View File

@@ -661,23 +661,29 @@ int cmd_checker_check::dolater(int cmd, myarray data)
slave_acked.append(myarray());
}
slave_acked_num=0;
if(key_press()!=0){
}else{
busy=0;
qWarning("key not pressed,check will not start.");
return 2;
}
myarray moter_cmd=moter_ctrl("down");
if(moter_cmd.size()==0){
busy=0;
qWarning("moter failed.");
return 1;
}
if(key_press()!=0){
}else{
m4->set_irq_fun(moter_down_cb_fun,"moter down");
emit send_to_m4_signal(moter_cmd);
}else{
qWarning("key not pressed,check will not start.");
return 2;
}
return 0;
}
int cmd_checker_check::key_press(){
return cmd_m4_key_pressed();
if(syscfg()->auto_test==0){
return cmd_m4_key_pressed();
}else{
return 1;
}
}