From 0bd9e604b2794b463ea08493df679a20dd2a5469 Mon Sep 17 00:00:00 2001 From: pixhawk Date: Mon, 27 Dec 2010 20:55:20 +0100 Subject: [PATCH] Update settings fix --- src/ui/HDDisplay.cc | 5 +---- src/ui/HSIDisplay.cc | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/ui/HDDisplay.cc b/src/ui/HDDisplay.cc index 953740be3..119249402 100644 --- a/src/ui/HDDisplay.cc +++ b/src/ui/HDDisplay.cc @@ -231,7 +231,7 @@ void HDDisplay::renderOverlay() void HDDisplay::setActiveUAS(UASInterface* uas) { //qDebug() << "ATTEMPTING TO SET UAS"; - if (this->uas != NULL && this->uas != uas) + if (this->uas != NULL) { // Disconnect any previously connected active MAV disconnect(this->uas, SIGNAL(valueChanged(UASInterface*,QString,double,quint64)), this, SLOT(updateValue(UASInterface*,QString,double,quint64))); @@ -239,12 +239,9 @@ void HDDisplay::setActiveUAS(UASInterface* uas) // Now connect the new UAS - if (this->uas != uas) - { //qDebug() << "UAS SET!" << "ID:" << uas->getUASID(); // Setup communication connect(uas, SIGNAL(valueChanged(UASInterface*,QString,double,quint64)), this, SLOT(updateValue(UASInterface*,QString,double,quint64))); - } this->uas = uas; } diff --git a/src/ui/HSIDisplay.cc b/src/ui/HSIDisplay.cc index 5179b3e4c..6b547aced 100644 --- a/src/ui/HSIDisplay.cc +++ b/src/ui/HSIDisplay.cc @@ -435,8 +435,6 @@ void HSIDisplay::setMetricWidth(double width) */ void HSIDisplay::setActiveUAS(UASInterface* uas) { - if (this->uas != uas) - { if (this->uas != NULL) { disconnect(this->uas, SIGNAL(gpsSatelliteStatusChanged(int,int,float,float,float,bool)), this, SLOT(updateSatellite(int,int,float,float,float,bool))); @@ -477,7 +475,6 @@ void HSIDisplay::setActiveUAS(UASInterface* uas) connect(uas, SIGNAL(irUltraSoundLocalizationChanged(UASInterface*,int)), this, SLOT(updateInfraredUltrasoundLocalization(UASInterface*,int))); this->uas = uas; - } } void HSIDisplay::updateSpeed(UASInterface* uas, double vx, double vy, double vz, quint64 time) -- 2.22.0