Skip to content
Snippets Groups Projects
Commit 9f17108e authored by tstellanova's avatar tstellanova
Browse files

ignoring UAS updates while slider has no param name

parent 8d98abe2
Branches
No related tags found
No related merge requests found
......@@ -92,31 +92,31 @@ void QGCParamSlider::refreshParamList()
void QGCParamSlider::setActiveUAS(UASInterface* activeUas)
{
if (activeUas)
{
if (uas)
{
if (activeUas) {
// Set param info
if (!parameterName.isEmpty()) {
//disconnect from any existing uas signals
if (uas != activeUas) {
disconnect(uas, SIGNAL(parameterChanged(int,int,int,int,QString,QVariant)), this, SLOT(setParameterValue(int,int,int,int,QString,QVariant)));
}
// Connect buttons and signals
connect(activeUas, SIGNAL(parameterChanged(int,int,int,int,QString,QVariant)), this, SLOT(setParameterValue(int,int,int,int,QString,QVariant)), Qt::UniqueConnection);
uas = activeUas;
// Update current param value
//requestParameter();
// Set param info
}
QString text = uas->getParamManager()->getParamInfo(parameterName);
if (text != "")
{
if (text != "") {
ui->infoLabel->setToolTip(text);
ui->infoLabel->show();
}
// Force-uncheck and hide label if no description is available
if (ui->editInfoCheckBox->isChecked())
{
if (ui->editInfoCheckBox->isChecked()) {
showInfo((text.length() > 0));
}
}
else {
//when parameter widgets are first loaded, they are disconnected from any parameter?
qWarning() << __FILE__ << ":" << __LINE__ << "slider has no parameterName??";
}
}
}
void QGCParamSlider::requestParameter()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment