添加高程界面

This commit is contained in:
2020-07-01 18:22:49 +08:00
parent ca43e2075a
commit 882e35e99d
15 changed files with 181 additions and 22 deletions
+8 -2
View File
@@ -18,6 +18,10 @@ DLink::DLink(QObject *parent) : QObject(parent)
connect(mavlinknode,SIGNAL(SendMessageTo(quint8,quint8*,quint16)),
this,SLOT(SendMessageTo(quint8,quint8*,quint16)),Qt::DirectConnection);//采用直连的方式,因为是多线程
connect(mavlinknode,SIGNAL(showMessage(QString,int)),
this,SIGNAL(showMessage(QString,int)),Qt::DirectConnection);
//其他协议节点。。。
}
@@ -96,12 +100,13 @@ bool DLink::setupPort(const QString port, qint32 baudrate, QSerialPort::Parity p
isSuccess = true;
emit showMessage(tr("Serial Port Open Success"));
qDebug() << "Serial Port Open Success";
}
else
{
isSuccess = false;
emit showMessage(tr("Serial Port Open Fail"));
qDebug() << "Serial Port Open Fail";
delete serialPort;
serialPort = nullptr;
@@ -117,6 +122,7 @@ bool DLink::statesPort()
void DLink::stopPort()
{
emit showMessage(tr("Serial Port close"));
serialPort->close();
delete serialPort;
serialPort = nullptr;
@@ -215,7 +221,7 @@ bool DLink::setupClient(const QHostAddress &remote_addr, int remote_port, int lo
mavlinknode->start();
isSuccess = true;
emit showMessage(tr("UdpSocket open"));
}
else
{