Commit 73ce117b authored by tstellanova's avatar tstellanova

More signal /slot fixes

parent c1ed602e
......@@ -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()));
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment