diff --git a/src/uas/QGCUASParamManager.cc b/src/uas/QGCUASParamManager.cc index 450fe797011e8aae10b2aa9700eae6b6fba1a75e..f1cc5fd20c67ce670f2061d351cef2ea1d245ee7 100644 --- a/src/uas/QGCUASParamManager.cc +++ b/src/uas/QGCUASParamManager.cc @@ -30,16 +30,11 @@ QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) : void parameterUpdated(int compId, QString paramName, QVariant value); - connect(paramDataModel, SIGNAL(parameterUpdated(int, QString , QVariant )), - this, SLOT(handleParameterUpdate(int,QString,QVariant))); // connect(uas, SIGNAL(parameterChanged(int,int,int,int,QString,QVariant)), // this, SLOT(receivedParameterUpdate(int,int,int,int,QString,QVariant))); - // Listen for param list reload finished - connect(paramCommsMgr, SIGNAL(parameterListUpToDate()), - this, SLOT(handleParameterListUpToDate())); diff --git a/src/uas/QGCUASParamManager.h b/src/uas/QGCUASParamManager.h index 4cb6d446c18f3212c349a3004975a67a6af03a13..a5c4b40f2fbf9337da71b5db8bfcf35854904f64 100644 --- a/src/uas/QGCUASParamManager.h +++ b/src/uas/QGCUASParamManager.h @@ -52,7 +52,7 @@ public slots: /** @brief Request a single parameter by name from the MAV */ virtual void requestParameterUpdate(int component, const QString& parameter); - virtual void handleParameterUpdate(int component, int paramId, const QString& parameterName, QVariant value) = 0; + virtual void handleParameterUpdate(int component, const QString& parameterName, QVariant value) = 0; virtual void handleParameterListUpToDate() = 0; diff --git a/src/ui/QGCParamWidget.cc b/src/ui/QGCParamWidget.cc index 5b4b137239afaacd6ac8849b22a0297885540192..5ec85bceba1b390a8fe543123c2c81cb21f43e4b 100644 --- a/src/ui/QGCParamWidget.cc +++ b/src/ui/QGCParamWidget.cc @@ -133,17 +133,27 @@ QGCParamWidget::QGCParamWidget(UASInterface* uas, QWidget *parent) : tree->setExpandsOnDoubleClick(true); // Connect signals/slots - connect(this, SIGNAL(parameterChanged(int,QString,QVariant)), mav, SLOT(setParameter(int,QString,QVariant))); - connect(tree, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(parameterItemChanged(QTreeWidgetItem*,int))); +// connect(this, SIGNAL(parameterChanged(int,QString,QVariant)), +// mav, SLOT(setParameter(int,QString,QVariant))); + connect(tree, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(parameterItemChanged(QTreeWidgetItem*,int))); - // New parameters from UAS - connect(uas, SIGNAL(parameterChanged(int,int,int,int,QString,QVariant)), this, SLOT(receivedParameterUpdate(int,int,int,int,QString,QVariant))); +// // New parameters from UAS +// connect(uas, SIGNAL(parameterChanged(int,int,int,int,QString,QVariant)), this, SLOT(receivedParameterUpdate(int,int,int,int,QString,QVariant))); // connect(&retransmissionTimer, SIGNAL(timeout()), this, SLOT(retransmissionGuardTick())); // connect(this, SIGNAL(requestParameter(int,QString)), uas, SLOT(requestParameter(int,QString))); // connect(this, SIGNAL(requestParameter(int,int)), uas, SLOT(requestParameter(int,int))); + + connect(paramDataModel, SIGNAL(parameterUpdated(int, QString , QVariant )), + this, SLOT(handleParameterUpdate(int,QString,QVariant))); + + // Listen for param list reload finished + connect(paramCommsMgr, SIGNAL(parameterListUpToDate()), + this, SLOT(handleParameterListUpToDate())); + // Get parameters if (uas) { requestAllParamsUpdate(); @@ -331,9 +341,8 @@ void QGCParamWidget::addComponentItem( int compId, QString compName) //} -void QGCParamWidget::handleParameterUpdate(int componentId, int paramId, const QString& paramName, QVariant value) +void QGCParamWidget::handleParameterUpdate(int componentId, const QString& paramName, QVariant value) { - Q_UNUSED(paramId); updateParameterDisplay(componentId, paramName, value); } diff --git a/src/ui/QGCParamWidget.h b/src/ui/QGCParamWidget.h index 49ae50740264da473d9852632a844c92eef860b3..5a356b722bdc81e5dfebd4a4ba692cf5235764cf 100644 --- a/src/ui/QGCParamWidget.h +++ b/src/ui/QGCParamWidget.h @@ -67,7 +67,7 @@ public slots: /** @brief Add a parameter to the list with retransmission / safety checks */ // void receivedParameterUpdate(int uas, int component, int paramCount, int paramId, QString parameterName, QVariant value); - virtual void handleParameterUpdate(int component, int paramId, const QString& parameterName, QVariant value); + virtual void handleParameterUpdate(int component,const QString& parameterName, QVariant value); virtual void handleParameterListUpToDate(); virtual void handleParamStatusMsgUpdate(QString msg, int level);