添加tran命令透传小板命令

添加slave_info命令测试小板通信状态
  添加cfginfo命令显示配置文件信息
  按键处于按下状态才响应检测命令
This commit is contained in:
ranchuan
2023-12-29 18:09:10 +08:00
parent 92f3ebbe33
commit 66ecf9c411
12 changed files with 212 additions and 50 deletions

View File

@@ -5,6 +5,7 @@
#include "elec/JQ_PSDGenerate.h"
#include "elec/JQ_UIDGenerate.h"
#include "elec/PSDGenerate.h"
#include "prot_cmd/cmd_m4.h"
@@ -655,19 +656,24 @@ int cmd_checker_check::dolater(int cmd, myarray data)
}
}
};
myarray moter_cmd=moter_ctrl("down");
if(moter_cmd.size()==0){
busy=0;
qWarning("moter failed.");
}else{
m4->set_irq_fun(moter_down_cb_fun,"moter down");
emit send_to_m4_signal(moter_cmd);
}
slave_acked.clear();
for(int i=0;i<addrs.size();i++){
slave_acked.append(myarray());
}
slave_acked_num=0;
myarray moter_cmd=moter_ctrl("down");
if(moter_cmd.size()==0){
busy=0;
qWarning("moter failed.");
return 1;
}
if(cmd_m4_key_pressed()!=0){
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;
}