From 34ec7b080c1a55d8b20775a25ce0133ee38e9a59 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 15 Apr 2015 10:09:01 -0700 Subject: [PATCH] Fix multiple vehicle check --- .../PX4/AirframeComponentController.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/AirframeComponentController.cc b/src/AutoPilotPlugins/PX4/AirframeComponentController.cc index d00abe9f0..0e9873862 100644 --- a/src/AutoPilotPlugins/PX4/AirframeComponentController.cc +++ b/src/AutoPilotPlugins/PX4/AirframeComponentController.cc @@ -92,17 +92,7 @@ AirframeComponentController::~AirframeComponentController() void AirframeComponentController::changeAutostart(void) { - LinkManager* linkManager = LinkManager::instance(); - - // This shouldn't theoretically be needed since a disconnected link should be deleted. But - // for some reason multiple links are coming up. - int connectedLinkCount = 0; - foreach (LinkInterface* link, linkManager->getLinks()) { - if (link->isConnected()) { - connectedLinkCount++; - } - } - if (connectedLinkCount > 1) { + if (UASManager::instance()->getUASList().count() > 1) { QGCMessageBox::warning("Airframe Config", "You cannot change airframe configuration while connected to multiple vehicles."); return; } -- 2.22.0