添加定时器

This commit is contained in:
hm
2020-10-12 14:39:16 +08:00
parent daa48c4b61
commit 5fa54bde78
13 changed files with 311 additions and 161 deletions
+44 -3
View File
@@ -6,14 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>548</width>
<height>404</height>
<width>358</width>
<height>461</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
@@ -224,6 +224,47 @@
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>舵机指令</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="pushButton_Servo_Check">
<property name="text">
<string>上电自检</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_Servo_Read">
<property name="text">
<string>舵面找零</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_Servo_Zero">
<property name="text">
<string>地面自检 </string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_Servo_Work">
<property name="text">
<string>工作模式</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
+15
View File
@@ -14,6 +14,21 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>1</number>
</property>
<property name="topMargin">
<number>1</number>
</property>
<property name="rightMargin">
<number>1</number>
</property>
<property name="bottomMargin">
<number>1</number>
</property>
<property name="spacing">
<number>1</number>
</property>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_Command">
<property name="title">
+12
View File
@@ -20,6 +20,7 @@ Inputter::Inputter(QWidget *parent) :
inputType = type::Normal;
DecimalPlaces = -1;
ui->label->hide();
ui->lineEdit->setText(curentStr);
ui->lineEdit->setReadOnly(true);
@@ -82,6 +83,17 @@ void Inputter::setDecimalPlaces(int value)
DecimalPlaces = value;
}
void Inputter::setLabel(QVariant s)
{
if(ui->label->isHidden())
{
ui->label->show();
}
ui->label->setText(s.toString());
}
void Inputter::on_NumberClicked(QString str)
{
if((!curentStr.contains('n'))&&(!curentStr.contains('a')))
+1 -1
View File
@@ -30,7 +30,7 @@ public slots:
void setInputType(int Type);//0 number ,1 mac addr
void setInitValue(QVariant value);
void setDecimalPlaces(int value);
void setLabel(QVariant s);
signals:
void confirmValue(QVariant);
+27 -14
View File
@@ -41,7 +41,20 @@
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="lineEdit">
<property name="minimumSize">
<size>
@@ -63,19 +76,13 @@
</widget>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<widget class="QLabel" name="label_decription">
<property name="text">
<string/>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="3">
<widget class="QPushButton" name="pushButton_3">
@@ -409,8 +416,14 @@
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_decription">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="text">
<string/>
</property>
+10 -4
View File
@@ -102,10 +102,10 @@ void HealthUI::setState(uint32_t pos,uint32_t sta)
setColor(ui->label_18,(sta == 0)?(state::success):((sta == 1)?(state::failure):(state::warning)));
break;
case 19:
setColor(ui->label_19,(sta == 0)?(state::success):((sta == 1)?(state::failure):(state::warning)));
//setColor(ui->label_19,(sta == 0)?(state::success):((sta == 1)?(state::failure):(state::warning)));
break;
case 20:
setColor(ui->label_20,(sta == 0)?(state::success):((sta == 1)?(state::failure):(state::warning)));
//setColor(ui->label_20,(sta == 0)?(state::success):((sta == 1)?(state::failure):(state::warning)));
break;
case 21:
@@ -123,6 +123,9 @@ void HealthUI::setState(uint32_t pos,uint32_t sta)
case 25:
setColor(ui->label_25,(sta == 0)?(state::success):((sta == 1)?(state::failure):(state::warning)));
break;
case 26:
setColor(ui->label_26,(sta == 0)?(state::success):((sta == 1)?(state::failure):(state::warning)));
break;
}
}
@@ -188,10 +191,10 @@ void HealthUI::setValueState(uint32_t pos,QVariant sta)
setValue(ui->label_18,sta.toString());
break;
case 19:
setValue(ui->label_19,sta.toString());
//setValue(ui->label_19,sta.toString());
break;
case 20:
setValue(ui->label_20,sta.toString());
//setValue(ui->label_20,sta.toString());
break;
case 21:
@@ -209,6 +212,9 @@ void HealthUI::setValueState(uint32_t pos,QVariant sta)
case 25:
setValue(ui->label_25,sta.toString());
break;
case 26:
setValue(ui->label_26,sta.toString());
break;
}
}
+79 -86
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>368</width>
<height>219</height>
<width>434</width>
<height>278</height>
</rect>
</property>
<property name="windowTitle">
@@ -59,7 +59,7 @@
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string/>
<string>设备</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -218,19 +218,6 @@
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_8">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>空速管</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_7">
<property name="styleSheet">
@@ -266,19 +253,6 @@
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_18">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>ECU</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_12">
<property name="styleSheet">
@@ -292,19 +266,6 @@
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="label_19">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>仿真机</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_9">
<property name="styleSheet">
@@ -318,19 +279,6 @@
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QLabel" name="label_20">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>记录仪</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_4">
<property name="styleSheet">
@@ -363,7 +311,33 @@
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>选择SBG</string>
<string>ECU</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_8">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>记录仪</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_18">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>仿真机</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -376,7 +350,7 @@
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string/>
<string>状态</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -385,6 +359,32 @@
<property name="spacing">
<number>15</number>
</property>
<item row="0" column="4">
<widget class="QLabel" name="label_25">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>卫星</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_22">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>抛伞</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_23">
<property name="styleSheet">
@@ -398,6 +398,19 @@
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_24">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>充气2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_21">
<property name="minimumSize">
@@ -417,39 +430,19 @@
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_24">
<item row="1" column="0">
<widget class="QLabel" name="label_26">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>充气2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_22">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>抛伞</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="label_25">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>卫星</string>
<string>选择SBG</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
+17
View File
@@ -1133,6 +1133,7 @@ void propertyui::on_pushButton_Alt_clicked()
Inputter *inputter = new Inputter(this);
inputter->setGeometry(0,0,this->width(),this->height());
inputter->setLabel(tr("set") + ui->pushButton_AltType->text() + tr("Altitude"));
inputter->setInitValue(ui->pushButton_Alt->text());
inputter->setDecimalPlaces(0);
@@ -1155,6 +1156,7 @@ void propertyui::on_pushButton_Lat_clicked()
Inputter *inputter = new Inputter(this);
inputter->setGeometry(0,0,this->width(),this->height());
inputter->setLabel(tr("setLatitude"));
inputter->setDecimalPlaces(6);
inputter->setInitValue(ui->pushButton_Lat->text());
connect(inputter,SIGNAL(confirmValue(QVariant)),
@@ -1175,6 +1177,7 @@ void propertyui::on_pushButton_Lng_clicked()
Inputter *inputter = new Inputter(this);
inputter->setGeometry(0,0,this->width(),this->height());
inputter->setLabel(tr("setLongitude"));
inputter->setDecimalPlaces(6);
inputter->setInitValue(ui->pushButton_Lng->text());
@@ -1222,6 +1225,8 @@ void propertyui::on_pushButton_Param1_clicked()
Inputter *inputter = new Inputter(this);
inputter->setGeometry(0,0,this->width(),this->height());
inputter->setLabel(ui->label_Param1->text());
int DecimalPlaces = 0;
for(QMap<int, MissionCmdParamInfo*>::const_iterator item = _paramInfoMap.begin();item != _paramInfoMap.end();item++)
@@ -1279,6 +1284,8 @@ void propertyui::on_pushButton_Param2_clicked()
Inputter *inputter = new Inputter(this);
inputter->setGeometry(0,0,this->width(),this->height());
inputter->setLabel(ui->label_Param2->text());
int DecimalPlaces = 0;
for(QMap<int, MissionCmdParamInfo*>::const_iterator item = _paramInfoMap.begin();item != _paramInfoMap.end();item++)
@@ -1337,6 +1344,8 @@ void propertyui::on_pushButton_Param3_clicked()
Inputter *inputter = new Inputter(this);
inputter->setGeometry(0,0,this->width(),this->height());
inputter->setLabel(ui->label_Param3->text());
int DecimalPlaces = 0;
for(QMap<int, MissionCmdParamInfo*>::const_iterator item = _paramInfoMap.begin();item != _paramInfoMap.end();item++)
@@ -1394,6 +1403,8 @@ void propertyui::on_pushButton_Param4_clicked()
Inputter *inputter = new Inputter(this);
inputter->setGeometry(0,0,this->width(),this->height());
inputter->setLabel(ui->label_Param4->text());
int DecimalPlaces = 0;
for(QMap<int, MissionCmdParamInfo*>::const_iterator item = _paramInfoMap.begin();item != _paramInfoMap.end();item++)
@@ -1451,6 +1462,8 @@ void propertyui::on_pushButton_Param5_clicked()
Inputter *inputter = new Inputter(this);
inputter->setGeometry(0,0,this->width(),this->height());
inputter->setLabel(ui->label_Param5->text());
int DecimalPlaces = 0;
for(QMap<int, MissionCmdParamInfo*>::const_iterator item = _paramInfoMap.begin();item != _paramInfoMap.end();item++)
@@ -1508,6 +1521,8 @@ void propertyui::on_pushButton_Param6_clicked()
Inputter *inputter = new Inputter(this);
inputter->setGeometry(0,0,this->width(),this->height());
inputter->setLabel(ui->label_Param6->text());
int DecimalPlaces = 0;
for(QMap<int, MissionCmdParamInfo*>::const_iterator item = _paramInfoMap.begin();item != _paramInfoMap.end();item++)
@@ -1565,6 +1580,8 @@ void propertyui::on_pushButton_Param7_clicked()
Inputter *inputter = new Inputter(this);
inputter->setGeometry(0,0,this->width(),this->height());
inputter->setLabel(ui->label_Param7->text());
int DecimalPlaces = 0;
for(QMap<int, MissionCmdParamInfo*>::const_iterator item = _paramInfoMap.begin();item != _paramInfoMap.end();item++)
+46 -2
View File
@@ -413,7 +413,7 @@
<property name="spacing">
<number>2</number>
</property>
<item row="0" column="0">
<item row="0" column="1">
<widget class="QPushButton" name="pushButton_Lat">
<property name="minimumSize">
<size>
@@ -426,7 +426,7 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_Lng">
<property name="minimumSize">
<size>
@@ -439,6 +439,50 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>lat</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>lon</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
-32
View File
@@ -23,38 +23,6 @@
<set>Qt::AlignCenter</set>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="pushButton_Servo_Check">
<property name="text">
<string>上电自检</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_Servo_Read">
<property name="text">
<string>舵面找零</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_Servo_Zero">
<property name="text">
<string>地面自检 </string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_Servo_Work">
<property name="text">
<string>工作模式</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
+8 -18
View File
@@ -357,7 +357,7 @@ void MainWindow::resizeEvent(QResizeEvent *event)
copk->width(),copk->height());
healthui->setGeometry(this->width() - copk->width(),menuBarUI->height() + copk->height(),
copk->width(),215);
copk->width(),280);
statusui->setGeometry(map->width(),
@@ -935,26 +935,16 @@ void MainWindow::updateUI()//事件驱动式更新数据
healthui->setState(1,getBit(health,6)?(getBit(health,0)?(0):(2)):(1));//IMU
healthui->setState(2,getBit(health,7)?(getBit(health,1)?(0):(2)):(1));//SBG
healthui->setState(3,getBit(health,12)?(2):(0));//sel
healthui->setValueState(3,getBit(health,12)?(tr("连接内置惯导")):(tr("连接SBG")));//sel
healthui->setState(4,getBit(health,8)?(getBit(health,2)?(0):(2)):(1));//BMU
healthui->setState(3,getBit(health,9)?(getBit(health,3)?(0):(2)):(1));//ECU
healthui->setState(5,getBit(health,10)?(getBit(health,4)?(0):(2)):(1));//CCM
healthui->setState(18,getBit(health,9)?(getBit(health,3)?(0):(2)):(1));//ECU
healthui->setState(10,getBit(health,11)?(getBit(health,5)?(0):(2)):(1));//FL
healthui->setState(6,getBit(health,0));//DLINK
healthui->setState(6,getBit(health,(dlink->mavlinknode->isCommunicationLost)?(1):(0)));//DLINK
healthui->setState(7,getBit(health,13));//AIR
healthui->setState(8,getBit(health,14));//AS
healthui->setState(8,getBit(health,14));//record
healthui->setState(9,getBit(health,15));//FP
healthui->setState(10,getBit(health,11)?(getBit(health,5)?(0):(2)):(1));//FL
healthui->setState(11,getBit(health,16));//LA
healthui->setState(12,getBit(health,17));//RA
healthui->setState(13,getBit(health,18));//LE
@@ -964,9 +954,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
healthui->setState(16,getBit(health,21));//LP
healthui->setState(17,getBit(health,22));//RP
healthui->setState(19,getBit(health,23));//SIM
healthui->setState(20,getBit(health,24));//RECORD
healthui->setState(18,getBit(health,23));//SIM
healthui->setState(21,getBit(health,25));//OPEN U
healthui->setState(22,getBit(health,26));//TROW U
@@ -974,6 +962,8 @@ void MainWindow::updateUI()//事件驱动式更新数据
healthui->setState(24,getBit(health,28));//ENG 2
healthui->setState(25,getBit(health,29));//GPS
healthui->setState(26,getBit(health,12)?(2):(0));//sel
healthui->setValueState(26,getBit(health,12)?(tr("连接内置惯导")):(tr("连接SBG")));//sel
}
+41
View File
@@ -28,6 +28,24 @@ MavLinkNode::MavLinkNode(QObject *parent) : QObject(parent)
int Current_sysID = 0xFB;
int Current_CompID = MAV_COMP_ID_MISSIONPLANNER;
CommucationOverTimer = 5000;
timer = new QTimer(this);
timer->moveToThread(thread);
timer->setInterval(CommucationOverTimer);
connect(thread, SIGNAL(started()), timer, SLOT(start()));
connect(timer,SIGNAL(timeout()),
this,SLOT(TimerOut,Qt::DirectConnection));
//timer->start();
qDebug() << "start timer";
//comm
replay = new Replay();
connect(replay,SIGNAL(readReady()),
this,SLOT(readPendingDatagramsReplay()),Qt::DirectConnection);
@@ -63,6 +81,7 @@ MavLinkNode::MavLinkNode(QObject *parent) : QObject(parent)
connect(Commander,SIGNAL(showMessage(QString,int)),
this,SIGNAL(showMessage(QString,int)),Qt::DirectConnection);
isCommunicationLost = false;
showMessage(tr("解锁才能有航迹,需要修正,示波器显示时间不对"));
}
@@ -117,6 +136,13 @@ MavLinkNode::~MavLinkNode()
}
}
if(timer)
{
timer->stop();
delete timer;
}
if(thread->isRunning())
{
thread->quit();
@@ -160,6 +186,8 @@ void MavLinkNode::start()
qDebug() << "MavLinkNode thread start" << running_flag;
if(replay)
{
replay->start();
@@ -210,6 +238,8 @@ void MavLinkNode::stop()
//这里一直在解码,一直检查双缓冲里面是否有数据,有就解码,没有就休息
void MavLinkNode::process()//线程函数
{
uint8_t count = 0;
QByteArray datagram = nullptr;
while (running_flag)
@@ -244,6 +274,13 @@ void MavLinkNode::process()//线程函数
thread->wait();
}
void MavLinkNode::TimerOut(void)
{
isCommunicationLost = true;
qDebug() << "timeout" << "communication lost";
}
void MavLinkNode::initbuff(void)
{
client_buff.max_size = 10 * 1024 *1024;//10M
@@ -358,6 +395,10 @@ void MavLinkNode::Mavlinkparse(quint32 src,QByteArray datagram)
count++;
if(msg.sysid < 250) //过滤地面站发过来的数据
{
//timer->start();
isCommunicationLost = true;
MAVLinkRcv_Handler(msg); //接收完一帧数据并处理
emit recievemsg(msg); //将信息广播出去
}
+11 -1
View File
@@ -70,6 +70,7 @@ public:
ParameterProcess *Parameter = nullptr;
commandprocess *Commander = nullptr;
bool isCommunicationLost = false;
signals:
void showMessage(const QString &message,int TimeOut = 0);
@@ -102,6 +103,9 @@ public slots:
{
return running_flag;
}
//缓存对外接口
void readPendingDatagramsReplay(void);
void setbuff(quint32 src, QByteArray data);
@@ -110,6 +114,9 @@ public slots:
void setLogfile(QString file);
private slots:
//线程私有接口
void process();
@@ -118,6 +125,8 @@ private slots:
void initbuff(void);
QByteArray readbuff(quint32 src);
void TimerOut(void);
//解析
void Mavlinkparse(quint32 src,QByteArray datagram);
@@ -141,6 +150,7 @@ protected:
s_port = 1
};
uint64_t CommucationOverTimer = 5000;
uint8_t GCS_System_ID = 0xFF;
@@ -155,7 +165,7 @@ protected:
QHash<int,int> vehicleList;
QTimer *timer = nullptr;
_buffdef serial_buff;
_buffdef client_buff;