添加广播方式升级
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include "prot/prot_slave.h"
|
||||
|
||||
|
||||
|
||||
// 从机检测命令
|
||||
class slave_check:public HandleSlave
|
||||
{
|
||||
public:
|
||||
@@ -13,4 +15,84 @@ public:
|
||||
void timeout();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取检测结果命令
|
||||
class slave_result:public HandleSlave
|
||||
{
|
||||
public:
|
||||
slave_result():HandleSlave(){}
|
||||
int start(myarray data);
|
||||
int dolater(int cmd, myarray data);
|
||||
void timeout();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// 设置硬件版本号命令
|
||||
class slave_sethardver:public HandleSlave
|
||||
{
|
||||
public:
|
||||
slave_sethardver():HandleSlave(){}
|
||||
int start(myarray data);
|
||||
int dolater(int cmd, myarray data);
|
||||
void timeout();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// 设置电阻校准值命令
|
||||
class slave_setresver:public HandleSlave
|
||||
{
|
||||
public:
|
||||
slave_setresver():HandleSlave(){}
|
||||
int start(myarray data);
|
||||
int dolater(int cmd, myarray data);
|
||||
void timeout();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取电阻值命令
|
||||
class slave_resvalue:public HandleSlave
|
||||
{
|
||||
public:
|
||||
slave_resvalue():HandleSlave(){}
|
||||
int start(myarray data);
|
||||
int dolater(int cmd, myarray data);
|
||||
void timeout();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 程序升级
|
||||
class boardcast_updata:public HandleBoardCast
|
||||
{
|
||||
public:
|
||||
boardcast_updata():HandleBoardCast(){step=0;count_sent=0;}
|
||||
int start(myarray data);
|
||||
int dolater(int cmd, myarray data);
|
||||
void timeout();
|
||||
bool send_packet();
|
||||
private:
|
||||
int step;
|
||||
myarray data;
|
||||
int count_sent;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // CMD_SLAVE_H
|
||||
|
Reference in New Issue
Block a user