航点突然不行
This commit is contained in:
@@ -204,7 +204,14 @@ void Inputter::on_pushButton_ok_clicked()
|
||||
}
|
||||
|
||||
//判断位数
|
||||
curentStr = QString::number(curentStr.toDouble(),'f',DecimalPlaces);
|
||||
if(DecimalPlaces == -1)
|
||||
{
|
||||
curentStr = QString::number(curentStr.toDouble());
|
||||
}
|
||||
else
|
||||
{
|
||||
curentStr = QString::number(curentStr.toDouble(),'f',DecimalPlaces);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -77,140 +77,7 @@
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="0">
|
||||
<widget class="QPushButton" name="pushButton_point">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pushButton_8">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButton_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" rowspan="2">
|
||||
<widget class="QPushButton" name="pushButton_minus">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>160</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>6666</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pushButton_1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -229,7 +96,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pushButton_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -248,45 +115,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="pushButton_nan">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>nan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="pushButton_0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<item row="2" column="3">
|
||||
<widget class="QPushButton" name="pushButton_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -305,45 +134,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_cancel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>666</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" rowspan="2">
|
||||
<item row="2" column="4" rowspan="2">
|
||||
<widget class="QPushButton" name="pushButton_del">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -362,7 +153,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" colspan="2">
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pushButton_8">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_ok">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -381,6 +191,222 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="pushButton_0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButton_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="pushButton_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QPushButton" name="pushButton_nan">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>nan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_cancel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>666</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="pushButton_point">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4" rowspan="2">
|
||||
<widget class="QPushButton" name="pushButton_minus">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>160</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>6666</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButton_1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
|
||||
@@ -15,6 +15,26 @@ Index1::Index1(QWidget *parent) :
|
||||
this->setStyleSheet(stylesheet);
|
||||
file.close();
|
||||
|
||||
|
||||
paramInspect = new ParameterInspector(this);
|
||||
|
||||
|
||||
//qRegisterMetaType<uint8_t>("uint8_t");
|
||||
//qRegisterMetaType<uint16_t>("uint16_t");
|
||||
//qRegisterMetaType<uint32_t>("uint32_t");
|
||||
|
||||
|
||||
//开启线程之后signal失效
|
||||
/*
|
||||
connect(paramInspect,SIGNAL(ReadCmd(uint8_t,uint8_t,uint8_t)),
|
||||
this,SLOT(ReadCmd(uint8_t,uint8_t,uint8_t)),Qt::DirectConnection);//多线程连接方式
|
||||
|
||||
connect(paramInspect,SIGNAL(WriteCmd(uint8_t,uint8_t,const char*,uint8_t,float)),
|
||||
this,SLOT(WriteCmd(uint8_t,uint8_t,const char*,uint8_t,float)),Qt::DirectConnection);
|
||||
*/
|
||||
|
||||
|
||||
|
||||
connect(this,SIGNAL(IndexChanged(int)),
|
||||
this,SLOT(onTabIndexChanged(int)));
|
||||
|
||||
@@ -30,9 +50,14 @@ void Index1::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
|
||||
if(paramInspector)
|
||||
if(paramInspect)
|
||||
{
|
||||
paramInspector->setGeometry(ui->frame->geometry());
|
||||
paramInspect->setGeometry(ui->frame->geometry());
|
||||
}
|
||||
|
||||
if(widget)
|
||||
{
|
||||
widget->setGeometry(ui->frame->geometry());
|
||||
}
|
||||
|
||||
update();
|
||||
@@ -44,18 +69,15 @@ void Index1::onTabIndexChanged(const int &index)//界面选择管理
|
||||
//参数设置
|
||||
if(index == 0)
|
||||
{
|
||||
if(paramInspector)
|
||||
paramInspector->show();
|
||||
if(paramInspect)
|
||||
paramInspect->show();
|
||||
}
|
||||
else
|
||||
else if(index == 1)
|
||||
{
|
||||
if(paramInspector)
|
||||
paramInspector->hide();
|
||||
if(widget)
|
||||
widget->hide();
|
||||
}
|
||||
|
||||
//地图设置
|
||||
//if(index == 1) paramInspector->show();
|
||||
//else paramInspector->hide();
|
||||
}
|
||||
|
||||
|
||||
@@ -72,14 +94,13 @@ void Index1::on_pushButton_Parameters_clicked()
|
||||
void Index1::setInstallWidget(QWidget *w)
|
||||
{
|
||||
|
||||
paramInspector = w;
|
||||
paramInspector->setParent(this);
|
||||
widget = w;
|
||||
widget->setParent(this);
|
||||
|
||||
if(paramInspector)
|
||||
if(widget)
|
||||
{
|
||||
//qDebug() << "install param inspector";
|
||||
paramInspector->setGeometry(0,0,ui->frame->width(),ui->frame->height());
|
||||
paramInspector->show();
|
||||
widget->setGeometry(0,0,ui->frame->width(),ui->frame->height());
|
||||
widget->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "QDebug"
|
||||
|
||||
|
||||
#include "ParameterInspector.h"
|
||||
|
||||
namespace Ui {
|
||||
class Index1;
|
||||
}
|
||||
@@ -21,12 +23,15 @@ public:
|
||||
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
|
||||
|
||||
ParameterInspector *paramInspect = nullptr;
|
||||
|
||||
private:
|
||||
Ui::Index1 *ui;
|
||||
|
||||
|
||||
|
||||
QWidget *paramInspector = nullptr;
|
||||
QWidget *widget = nullptr;
|
||||
private slots:
|
||||
|
||||
void onTabIndexChanged(const int &index);
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
|
||||
|
||||
|
||||
|
||||
include (./ParameterInspector/ParameterInspector.pri)
|
||||
|
||||
|
||||
|
||||
INCLUDEPATH += $$PWD/ParameterInspector
|
||||
|
||||
|
||||
|
||||
FORMS += \
|
||||
$$PWD/Index1.ui
|
||||
|
||||
|
||||
@@ -28,6 +28,19 @@
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" 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="0" column="0">
|
||||
<widget class="QPushButton" name="pushButton_Parameters">
|
||||
<property name="minimumSize">
|
||||
@@ -47,38 +60,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Nop</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" 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>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
|
||||
+74
-34
@@ -10,7 +10,7 @@ ParameterInspector::ParameterInspector(QWidget *parent) :
|
||||
setWindowTitle(tr("ParameterInspector"));
|
||||
|
||||
// Make sure "All" is an option for both the system and components
|
||||
ui->systemComboBox->addItem(tr("All"), 0);
|
||||
//ui->systemComboBox->addItem(tr("All"), 0);
|
||||
//ui->componentComboBox->addItem(tr("All"), 0);
|
||||
|
||||
// Set up the column headers for the message listing
|
||||
@@ -20,6 +20,9 @@ ParameterInspector::ParameterInspector(QWidget *parent) :
|
||||
header << tr("Type");
|
||||
ui->treeWidget->setHeaderLabels(header);
|
||||
|
||||
ui->treeWidget->header()->resizeSection(0,400);
|
||||
ui->treeWidget->header()->resizeSection(1,150);
|
||||
ui->treeWidget->header()->resizeSection(2,50);
|
||||
|
||||
TimerRunningFlag = true;
|
||||
QTimer::singleShot(1000,this,SLOT(mReflush()));
|
||||
@@ -57,12 +60,15 @@ void ParameterInspector::resizeEvent(QResizeEvent * event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
|
||||
ui->treeWidget->header()->resizeSection(0,ui->treeWidget->width() * 0.5);
|
||||
ui->treeWidget->header()->resizeSection(1,ui->treeWidget->width() * 0.20);
|
||||
ui->treeWidget->header()->resizeSection(2,ui->treeWidget->width() * 0.20);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//添加一个设备,
|
||||
void ParameterInspector::addVehicles(uint16_t sysid, uint16_t compid)
|
||||
void ParameterInspector::addVehicles(int sysid, int compid)
|
||||
{
|
||||
Q_UNUSED(compid)
|
||||
|
||||
@@ -72,12 +78,7 @@ void ParameterInspector::addVehicles(uint16_t sysid, uint16_t compid)
|
||||
QMap<int, mavlink_param_value_t> param;
|
||||
vehicles.insert(sysid,param);
|
||||
|
||||
//同时检查combox有没有,没有就添加
|
||||
if(ui->systemComboBox->findText(tr("Vehicle %1").arg(sysid)) == (-1))
|
||||
{
|
||||
ui->systemComboBox->addItem(tr("Vehicle %1").arg(sysid), sysid);
|
||||
}
|
||||
|
||||
ui->pushButton_system->setText(tr("Vehicle %1").arg(sysid));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,12 +95,6 @@ void ParameterInspector::appendParameter(mavlink_message_t msg)
|
||||
//如果还没有这个设备,就添加一个
|
||||
QMap<int, mavlink_param_value_t> param;
|
||||
vehicles.insert(msg.sysid,param);
|
||||
|
||||
//同时检查combox有没有,没有就添加
|
||||
if(ui->systemComboBox->findText(tr("Vehicle %1").arg(msg.sysid)) == (-1))
|
||||
{
|
||||
ui->systemComboBox->addItem(tr("Vehicle %1").arg(msg.sysid), msg.sysid);
|
||||
}
|
||||
}
|
||||
|
||||
//解码
|
||||
@@ -206,6 +201,9 @@ void ParameterInspector::refreshView()//来一个参数更新一次
|
||||
}
|
||||
|
||||
ui->treeWidget->addTopLevelItems(uasTopLevelItems.values());
|
||||
|
||||
ui->treeWidget->expandAll();
|
||||
ui->treeWidget->scrollToBottom();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,13 +520,68 @@ char* ParameterInspector::param_id(char *id)//设置id,如果id小于16,那么
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
void ParameterInspector::setsystem(QVariant vehicle)
|
||||
{
|
||||
qDebug() << "set vehicle" << vehicle;
|
||||
ui->pushButton_system->setText(vehicle.toString());
|
||||
}
|
||||
|
||||
void ParameterInspector::on_pushButton_system_clicked()
|
||||
{
|
||||
Selector *selector = new Selector(this);
|
||||
selector->setGeometry(0,0,this->width(),this->height());
|
||||
|
||||
QStringList list;
|
||||
list.clear();
|
||||
|
||||
QMap<int,QMap<int,mavlink_param_value_t>>::iterator ite;
|
||||
|
||||
for(ite=vehicles.begin(); ite!=vehicles.end();++ite)//每一个key下面都是一个设备的所有参数
|
||||
{
|
||||
list.append(tr("Vehicle %1").arg(ite.key()));
|
||||
}
|
||||
|
||||
selector->setList(list,ui->pushButton_system->text());
|
||||
connect(selector,SIGNAL(confirmValue(QVariant)),
|
||||
this,SLOT(setsystem(QVariant)));
|
||||
|
||||
selector->show();
|
||||
}
|
||||
|
||||
|
||||
void ParameterInspector::setvalue(QVariant value)
|
||||
{
|
||||
ui->pushButton_value->setText(value.toString());
|
||||
}
|
||||
|
||||
void ParameterInspector::on_pushButton_value_clicked()
|
||||
{
|
||||
Inputter *inputter = new Inputter(this);
|
||||
inputter->setGeometry(0,0,this->width(),this->height());
|
||||
|
||||
//int DecimalPlaces = 0;
|
||||
|
||||
//inputter->setDecimalPlaces(DecimalPlaces);
|
||||
|
||||
inputter->setInitValue(ui->pushButton_value->text());
|
||||
connect(inputter,SIGNAL(confirmValue(QVariant)),
|
||||
this,SLOT(setvalue(QVariant)));
|
||||
|
||||
inputter->show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ParameterInspector::on_ReadButton_clicked()
|
||||
{
|
||||
uint8_t m_sysid = 0;
|
||||
uint8_t m_compid = 1;
|
||||
uint8_t m_type = 0;
|
||||
|
||||
m_sysid = ui->systemComboBox->currentData().toInt();
|
||||
QString selectid = ui->pushButton_system->text().mid(8);
|
||||
m_sysid = selectid.toInt();
|
||||
|
||||
|
||||
emit ReadCmd(m_sysid,m_compid,m_type);
|
||||
}
|
||||
@@ -537,9 +590,9 @@ void ParameterInspector::on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item,
|
||||
{
|
||||
if(item->parent())//不是根节点才可以把数据写入框内
|
||||
{
|
||||
ui->SearchlineEdit->setText(item->data(0,Qt::DisplayRole).toString());
|
||||
ui->pushButton_id->setText(item->data(0,Qt::DisplayRole).toString());
|
||||
|
||||
ui->ValuelineEdit->setText(QString::number(item->data(1,Qt::DisplayRole).toFloat()));
|
||||
ui->pushButton_value->setText(QString::number(item->data(1,Qt::DisplayRole).toFloat()));
|
||||
|
||||
parentItem = item->parent()->data(0,Qt::DisplayRole).toString();
|
||||
|
||||
@@ -563,29 +616,16 @@ void ParameterInspector::on_WriteButton_clicked()
|
||||
|
||||
//qDebug() << id;
|
||||
|
||||
float value = param_getvalue(ui->ValuelineEdit->text().toFloat(),currentSelectType);
|
||||
float value = param_getvalue(ui->pushButton_value->text().toFloat(),currentSelectType);
|
||||
|
||||
emit WriteCmd(sysid,1,ui->SearchlineEdit->text().toLatin1().data(),currentSelectType,value);
|
||||
emit WriteCmd(sysid,1,ui->pushButton_id->text().toLatin1().data(),currentSelectType,value);
|
||||
|
||||
//读取是哪设备,是哪个参数,然后发送出去
|
||||
}
|
||||
|
||||
void ParameterInspector::on_NextpushButton_clicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ParameterInspector::on_SearchButton_clicked()
|
||||
{
|
||||
QString name = ui->SearchButton->text();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void ParameterInspector::on_CancelpushButton_clicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
+22
-8
@@ -23,13 +23,18 @@
|
||||
#include "mavlink.h"
|
||||
#include "mavlink_get_info.h"
|
||||
|
||||
|
||||
#include "QHeaderView"
|
||||
|
||||
|
||||
|
||||
#include "QTreeWidgetItem"
|
||||
|
||||
|
||||
|
||||
#include "multiselector.h"
|
||||
#include "Selector.h"
|
||||
#include "Inputter.h"
|
||||
#include "CharInputter.h"
|
||||
|
||||
|
||||
#ifdef QtMavlinkNode
|
||||
#include <mavlinknodeglobal.h>
|
||||
namespace Ui {
|
||||
@@ -118,7 +123,7 @@ signals:
|
||||
|
||||
public slots:
|
||||
|
||||
void addVehicles(uint16_t sysid,uint16_t compid);
|
||||
void addVehicles(int sysid, int compid);
|
||||
void appendParameter(mavlink_message_t msg);
|
||||
|
||||
|
||||
@@ -152,15 +157,24 @@ private slots:
|
||||
|
||||
|
||||
|
||||
//==================================
|
||||
|
||||
void setsystem(QVariant vehicle);
|
||||
|
||||
void setvalue(QVariant value);
|
||||
|
||||
|
||||
|
||||
|
||||
//==================================
|
||||
void on_WriteButton_clicked();
|
||||
|
||||
void on_NextpushButton_clicked();
|
||||
|
||||
void on_SearchButton_clicked();
|
||||
|
||||
void on_CancelpushButton_clicked();
|
||||
|
||||
void on_pushButton_system_clicked();
|
||||
|
||||
void on_pushButton_value_clicked();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
+7
-8
@@ -8,17 +8,16 @@ INCLUDEPATH += $$PWD/../mavlink \
|
||||
$$PWD/../mavlink/XYK \
|
||||
$$PWD/../mavlink/message_definitions
|
||||
|
||||
HEADERS += \
|
||||
ParameterInspector/ParameterInspector.h \
|
||||
FORMS += \
|
||||
$$PWD/ParameterInspector.ui
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/ParameterInspector.h
|
||||
|
||||
SOURCES += \
|
||||
ParameterInspector/ParameterInspector.cpp \
|
||||
|
||||
|
||||
|
||||
FORMS += \
|
||||
ParameterInspector/ParameterInspector.ui
|
||||
$$PWD/ParameterInspector.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+74
-86
@@ -16,26 +16,46 @@
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="maximumSize">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_value">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>16777215</height>
|
||||
<width>0</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_id">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="CancelpushButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="WriteButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -54,77 +74,22 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QPushButton" name="CancelpushButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLineEdit" name="ValuelineEdit">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="SearchButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<width>180</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>search</string>
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QLineEdit" name="SearchlineEdit">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>id</string>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="NextpushButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Next</string>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -138,25 +103,21 @@
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QPushButton" name="pushButton_system">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>System</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="systemComboBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -168,6 +129,12 @@
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
@@ -183,7 +150,7 @@
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -201,6 +168,27 @@
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="headerMinimumSectionSize">
|
||||
<number>50</number>
|
||||
</attribute>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>200</number>
|
||||
</attribute>
|
||||
<attribute name="headerHighlightSections">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="headerShowSortIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="headerStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
@@ -16,6 +16,10 @@ include (./Index1/Index1.pri)
|
||||
INCLUDEPATH += $$PWD/Index0 \
|
||||
$$PWD/Index1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/CharInputter
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/Inputter
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/MultiSelector
|
||||
|
||||
+19
-14
@@ -67,15 +67,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
map->setFocus();
|
||||
map->setMouseTracking(true);
|
||||
|
||||
//=========初始化UAV=========
|
||||
//map->SetShowUAV(true);//先show才能设置
|
||||
//map->SetUavPic("Fixwing.png");
|
||||
|
||||
internals::PointLatLng position;
|
||||
position.SetLat(10);
|
||||
position.SetLng(10);
|
||||
//map->UAV->SetUAVPos(position,10);
|
||||
//map->UAV->SetShowTrail(false);
|
||||
|
||||
map->setGeometry(0,
|
||||
0,
|
||||
@@ -110,7 +102,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
//setting ----- dlink
|
||||
|
||||
setting->index1->setInstallWidget(dlink->mavlinknode->Parameter->paramInspect);
|
||||
//setting->index1->setInstallWidget(dlink->mavlinknode->Parameter->paramInspect);
|
||||
toolsui->index0->setInstallWidget(dlink->mavlinknode->mavlinkinspector);
|
||||
|
||||
connect(dlink->mavlinknode,SIGNAL(state_updated()),
|
||||
@@ -119,7 +111,19 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(setting->index0->link,SIGNAL(connectSignal(QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant)),
|
||||
dlink,SLOT(connectSignal(QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant)));
|
||||
|
||||
qRegisterMetaType<mavlink_message_t>("mavlink_message_t");
|
||||
|
||||
connect(dlink->mavlinknode->Parameter,SIGNAL(RecieveValue(mavlink_message_t)),
|
||||
setting->index1->paramInspect,SLOT(appendParameter(mavlink_message_t)));
|
||||
|
||||
connect(dlink->mavlinknode,SIGNAL(addVehicles(int,int)),
|
||||
setting->index1->paramInspect,SLOT(addVehicles(int,int)),Qt::DirectConnection);
|
||||
|
||||
connect(setting->index1->paramInspect,SIGNAL(ReadCmd(uint8_t,uint8_t,uint8_t)),
|
||||
dlink->mavlinknode->Parameter,SLOT(ReadCmd(uint8_t,uint8_t,uint8_t)),Qt::DirectConnection);
|
||||
|
||||
connect(setting->index1->paramInspect,SIGNAL(WriteCmd(uint8_t,uint8_t,const char*,uint8_t,float)),
|
||||
dlink->mavlinknode->Parameter,SLOT(WriteCmd(uint8_t,uint8_t,const char*,uint8_t,float)),Qt::DirectConnection);
|
||||
|
||||
//mision ----- map
|
||||
connect(map, SIGNAL(WPProperty(float,float,float,float,int32_t,int32_t,float,uint16_t,uint16_t,uint16_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t)),
|
||||
@@ -170,11 +174,12 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(map,SIGNAL(signal_WPUpload(uint8_t,uint8_t,uint32_t)),
|
||||
dlink->mavlinknode->Mission,SLOT(WriteCmd(uint8_t,uint8_t,uint32_t)),Qt::DirectConnection);
|
||||
|
||||
qRegisterMetaType<int32_t>("int32_t");
|
||||
//qRegisterMetaType<int32_t>("int32_t");
|
||||
|
||||
//生成航线必须在map线程完成,因此不能直接连接
|
||||
connect(dlink->mavlinknode->Mission,SIGNAL(receivedPoint(float,float,float,float,int32_t,int32_t,float,uint16_t,uint16_t,uint16_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t)),
|
||||
map,SLOT(receivedPoint(float,float,float,float,int32_t,int32_t,float,uint16_t,uint16_t,uint16_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t)));
|
||||
map,SLOT(receivedPoint(float,float,float,float,int32_t,int32_t,float,uint16_t,uint16_t,uint16_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t)),Qt::DirectConnection);
|
||||
|
||||
|
||||
|
||||
connect(map,SIGNAL(WPProperty(float,float,float,float,int32_t,int32_t,float,uint16_t,uint16_t,uint16_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t)),
|
||||
@@ -188,7 +193,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
dlink->mavlinknode,SLOT(setCurrentSelected(int,int)),Qt::DirectConnection);
|
||||
|
||||
connect(dlink->mavlinknode->Mission,SIGNAL(sendItemOK(uint16_t,bool)),
|
||||
map,SLOT(WPSendItemOK(uint16_t,bool)));
|
||||
map,SLOT(WPSendItemOK(uint16_t,bool)),Qt::DirectConnection);
|
||||
|
||||
|
||||
|
||||
@@ -430,11 +435,11 @@ void MainWindow::subui(QString arg)//子界面管理
|
||||
}
|
||||
else if(arg == tr("Mavlink"))
|
||||
{
|
||||
dlink->mavlinknode->mavlinkinspector->show();
|
||||
//dlink->mavlinknode->mavlinkinspector->show();
|
||||
}
|
||||
else if(arg == tr("Parameter"))
|
||||
{
|
||||
dlink->mavlinknode->Parameter->paramInspect->show();
|
||||
//dlink->mavlinknode->Parameter->paramInspect->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
|
||||
# include sub project
|
||||
include (./ParameterInspector/ParameterInspector.pri)
|
||||
#include (./ParameterInspector/ParameterInspector.pri)
|
||||
include (./MAVLinkInspector/MAVLinkInspector.pri)
|
||||
|
||||
DESTDIR = $$PWD/../thirdpart/lib
|
||||
|
||||
@@ -458,7 +458,6 @@ void MavLinkNode::CheckVehicle(int sysid,int compid)
|
||||
if(!vehicleList.contains(sysid))
|
||||
{
|
||||
vehicleList.insert(sysid,compid);
|
||||
Parameter->paramInspect->addVehicles(sysid,compid);
|
||||
|
||||
emit addVehicles(sysid,compid);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ ParameterProcess::ParameterProcess(QObject *parent) : QObject(parent)
|
||||
{
|
||||
setRunFrq(1000);
|
||||
|
||||
paramInspect = new ParameterInspector();
|
||||
/* paramInspect = new ParameterInspector();
|
||||
|
||||
|
||||
qRegisterMetaType<uint8_t>("uint8_t");
|
||||
@@ -22,7 +22,7 @@ ParameterProcess::ParameterProcess(QObject *parent) : QObject(parent)
|
||||
|
||||
//隐藏
|
||||
paramInspect->hide();
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
void ParameterProcess::setRunFrq(uint32_t frq)
|
||||
@@ -171,7 +171,10 @@ void ParameterProcess::Parse(mavlink_message_t msg)
|
||||
}break;
|
||||
case MAVLINK_MSG_ID_PARAM_VALUE:{//
|
||||
mavlink_msg_param_value_decode(&msg,¶m_value);
|
||||
paramInspect->appendParameter(msg);//发送的时候需要连同当前的sysid 和 compid也发送下去
|
||||
//paramInspect->appendParameter(msg);//发送的时候需要连同当前的sysid 和 compid也发送下去
|
||||
|
||||
emit RecieveValue(msg);
|
||||
|
||||
status.recieve.isWaitingforValue = false;
|
||||
status.transmit.isWaitingforValue = false;
|
||||
//qDebug() << "param_value.param_index" << param_value.param_index;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "QTimer"
|
||||
#include "QTime"
|
||||
|
||||
#include "ParameterInspector/ParameterInspector.h"
|
||||
//#include "ParameterInspector/ParameterInspector.h"
|
||||
|
||||
#ifdef QtMavlinkNode
|
||||
#include <mavlinknodeglobal.h>
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
_parameter_ status;
|
||||
|
||||
|
||||
ParameterInspector *paramInspect;
|
||||
// ParameterInspector *paramInspect;
|
||||
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ signals:
|
||||
|
||||
void SendMessageTo(quint8 ch, quint8 *data,quint16 len);
|
||||
|
||||
|
||||
void RecieveValue(mavlink_message_t msg);
|
||||
|
||||
private:
|
||||
//线程运行参数
|
||||
|
||||
@@ -824,9 +824,6 @@ void OPMapWidget::ConnectWP(WayPointItem *item)
|
||||
item->emitWPProperty();
|
||||
|
||||
|
||||
|
||||
//WPsearchall();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1298,6 +1295,9 @@ void OPMapWidget::receivedPoint(float param1,float param2,float param3,float par
|
||||
//WPLineCreate(WPFind(Item->Number() - 1),Item,Qt::green,false,2);
|
||||
}
|
||||
|
||||
//Item->setParent(map);
|
||||
|
||||
|
||||
emit setWPProperty(param1,param2,param3,param4,
|
||||
x,y,z,
|
||||
seq,
|
||||
|
||||
@@ -276,6 +276,9 @@ void WayPointItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
//qInfo() << "PressEvent";
|
||||
isDragging = true;
|
||||
|
||||
//qDebug() << this->parent();
|
||||
|
||||
}
|
||||
QGraphicsItem::mousePressEvent(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user