添加tran命令透传小板命令
添加slave_info命令测试小板通信状态 添加cfginfo命令显示配置文件信息 按键处于按下状态才响应检测命令
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "QDebug"
|
||||
#include "elec/elec_judge.h"
|
||||
#include "QDateTime"
|
||||
#include "prot_cmd/cmd_m4.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -96,19 +97,24 @@ int selfdev_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<cfg->slave_num;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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user