修改航点,添加属性,修改显示
This commit is contained in:
@@ -51,12 +51,13 @@ MAVLinkInspector::MAVLinkInspector(const QString& title, QAction* action,QWidget
|
||||
}
|
||||
|
||||
|
||||
void MAVLinkInspector::_vehicleAdded(quint32 id)
|
||||
void MAVLinkInspector::_vehicleAdded(quint32 m_sysid,quint32 m_compid)
|
||||
{
|
||||
ui->systemComboBox->addItem(tr("Vehicle %1").arg(id), id);
|
||||
ui->systemComboBox->addItem(tr("Vehicle %1").arg(m_sysid), m_sysid);
|
||||
ui->componentComboBox->addItem(tr("Component %1").arg(m_compid), m_compid);
|
||||
|
||||
// Add a tree for a new UAS
|
||||
addUAStoTree(id);
|
||||
addUAStoTree(m_sysid);
|
||||
}
|
||||
|
||||
void MAVLinkInspector::selectDropDownMenuSystem(int dropdownid)
|
||||
@@ -274,9 +275,9 @@ void MAVLinkInspector::refreshView()
|
||||
}
|
||||
}
|
||||
|
||||
void MAVLinkInspector::addUAStoTree(int sysId)
|
||||
void MAVLinkInspector::addUAStoTree(int m_sysid)
|
||||
{
|
||||
if(!uasTreeWidgetItems.contains(sysId))
|
||||
if(!uasTreeWidgetItems.contains(m_sysid))
|
||||
{
|
||||
// Add the UAS to the main tree after it has been created
|
||||
//Vehicle* vehicle = qgcApp()->toolbox()->multiVehicleManager()->getVehicleById(sysId);
|
||||
@@ -284,12 +285,12 @@ void MAVLinkInspector::addUAStoTree(int sysId)
|
||||
{
|
||||
//UASInterface* uas = vehicle->uas();
|
||||
QStringList idstring;
|
||||
idstring << QString("Vehicle %1").arg(sysId);//uas->getUASID());
|
||||
idstring << QString("Vehicle %1").arg(m_sysid);//uas->getUASID());
|
||||
QTreeWidgetItem* uasWidget = new QTreeWidgetItem(idstring);
|
||||
uasWidget->setFirstColumnSpanned(true);
|
||||
uasTreeWidgetItems.insert(sysId,uasWidget);
|
||||
uasTreeWidgetItems.insert(m_sysid,uasWidget);
|
||||
ui->treeWidget->addTopLevelItem(uasWidget);
|
||||
uasMsgTreeItems.insert(sysId,new QMap<int, QTreeWidgetItem*>());
|
||||
uasMsgTreeItems.insert(m_sysid,new QMap<int, QTreeWidgetItem*>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,13 +77,13 @@ protected:
|
||||
/** @brief Rebuild the list of components */
|
||||
void rebuildComponentList();
|
||||
/* @brief Create a new tree for a new UAS */
|
||||
void addUAStoTree(int sysId);
|
||||
void addUAStoTree(int m_sysid);
|
||||
|
||||
static const unsigned int updateInterval; ///< The update interval of the refresh function
|
||||
static const float updateHzLowpass; ///< The low-pass filter value for the frequency of each message
|
||||
|
||||
private slots:
|
||||
void _vehicleAdded(quint32 id);
|
||||
void _vehicleAdded(quint32 m_sysid, quint32 m_compid);
|
||||
|
||||
private:
|
||||
Ui::MAVLinkInspector *ui;
|
||||
|
||||
Reference in New Issue
Block a user