76 lines
1.2 KiB
C++
76 lines
1.2 KiB
C++
#ifndef cmd_pc_h__
|
|
#define cmd_pc_h__
|
|
|
|
#include "prot/prot_pc.h"
|
|
|
|
|
|
// 检测 自研批检仪
|
|
class selfdev_check : public HandlePc
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
selfdev_check() : HandlePc() {
|
|
slave_acked_num=0;
|
|
moter_down_cb_fun=nullptr;
|
|
}
|
|
~selfdev_check() {
|
|
if(moter_down_cb_fun!=nullptr){
|
|
// 取消电机下降到位回调
|
|
prot_m4 *m4 = protM4();
|
|
if(m4!=nullptr) {
|
|
m4->del_irq_fun(moter_down_cb_fun,"moter ");
|
|
}
|
|
}
|
|
}
|
|
int dolater(int cmd, myarray data);
|
|
void timeout();
|
|
public slots:
|
|
void slave_end_slot(int addr,int ack, myarray data);
|
|
protected:
|
|
QList<myarray> slave_acked;
|
|
int slave_acked_num;
|
|
prot_m4_cb moter_down_cb_fun;
|
|
signals:
|
|
void send_to_m4_signal(myarray data);
|
|
};
|
|
|
|
|
|
|
|
// 电机 自研批检仪
|
|
class selfdev_moter : public HandlePc
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
selfdev_moter() : HandlePc() {}
|
|
~selfdev_moter() {}
|
|
int dolater(int cmd, myarray data);
|
|
void timeout();
|
|
signals:
|
|
void send_to_m4_signal(myarray data);
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 小板升级
|
|
class selfdev_slaveupdate : public HandlePc
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
selfdev_slaveupdate() : HandlePc() {}
|
|
~selfdev_slaveupdate() {}
|
|
int dolater(int cmd, myarray data);
|
|
void timeout();
|
|
signals:
|
|
void send_to_m4_signal(myarray data);
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|