udp
This commit is contained in:
@@ -22,7 +22,6 @@ MavLinkNode::MavLinkNode(QObject *parent) : QObject(parent)
|
||||
int Current_sysID = 0xF1;
|
||||
int Current_CompID = MAV_COMP_ID_MISSIONPLANNER;
|
||||
|
||||
|
||||
Mission = new MissionProcess();
|
||||
Mission->setGCSID(Current_sysID,Current_CompID);
|
||||
connect(Mission,SIGNAL(SendMessageTo(quint8,quint8*,quint16)),
|
||||
@@ -34,8 +33,6 @@ MavLinkNode::MavLinkNode(QObject *parent) : QObject(parent)
|
||||
connect(Mission,SIGNAL(showMessage(QString,int)),
|
||||
this,SIGNAL(showMessage(QString,int)),Qt::DirectConnection);
|
||||
|
||||
|
||||
|
||||
Parameter = new ParameterProcess();
|
||||
Parameter->setGCSID(Current_sysID,Current_CompID);
|
||||
connect(Parameter,SIGNAL(SendMessageTo(quint8,quint8*,quint16)),
|
||||
@@ -44,7 +41,6 @@ MavLinkNode::MavLinkNode(QObject *parent) : QObject(parent)
|
||||
connect(Parameter,SIGNAL(showMessage(QString,int)),
|
||||
this,SIGNAL(showMessage(QString,int)),Qt::DirectConnection);
|
||||
|
||||
|
||||
Commander = new commandprocess();
|
||||
Commander->setGCSID(Current_sysID,Current_CompID);
|
||||
connect(Commander,SIGNAL(SendMessageTo(quint8,quint8*,quint16)),
|
||||
@@ -287,8 +283,11 @@ void MavLinkNode::Mavlinkparse(quint32 src,QByteArray datagram)
|
||||
{
|
||||
if(MAVLINK_FRAMING_OK == mavlink_parse_char(src,*i,&msg,&status))
|
||||
{
|
||||
emit recievemsg(msg); //将信息广播出去
|
||||
MAVLinkRcv_Handler(msg); //接收完一帧数据并处理
|
||||
if(msg.compid != Current_CompID)//过滤地面站发过来的数据
|
||||
{
|
||||
emit recievemsg(msg); //将信息广播出去
|
||||
MAVLinkRcv_Handler(msg); //接收完一帧数据并处理
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user