多机管理完成

This commit is contained in:
2020-06-02 18:39:43 +08:00
parent 9c69cd6522
commit eb7e7913e1
14 changed files with 215 additions and 158 deletions
+9 -2
View File
@@ -78,6 +78,13 @@ void commandprocess::process()//线程函数
thread = nullptr;
}
void commandprocess::setID(int m_sysid,int m_compid)
{
//qDebug() << "command set id";
sysid = (uint8_t)m_sysid;
compid = (uint8_t)m_compid;
}
void commandprocess::SendMessage(mavlink_message_t msg)
{
uint8_t buff[256+20];
@@ -95,8 +102,8 @@ void commandprocess::WriteCmd(uint8_t m_sysid, uint8_t m_compid ,
int32_t y,
float z, uint16_t command, uint8_t frame, uint8_t current, uint8_t autocontinue)
{
sysid = m_sysid;
compid = m_compid;
//sysid = m_sysid;
//compid = m_compid;
//给指令赋值
cmd_int.param1 = param1;