diff --git a/src/AutoPilotPlugins/PX4/AirframeComponentController.cc b/src/AutoPilotPlugins/PX4/AirframeComponentController.cc index 71eee3a7b5942fe73d1b636a8b0f8c781a8bb0ea..0e9873862fb43a139c6c73dd4c3edc7e0d33472d 100644 --- a/src/AutoPilotPlugins/PX4/AirframeComponentController.cc +++ b/src/AutoPilotPlugins/PX4/AirframeComponentController.cc @@ -92,13 +92,11 @@ AirframeComponentController::~AirframeComponentController() void AirframeComponentController::changeAutostart(void) { - LinkManager* linkManager = LinkManager::instance(); - - if (linkManager->getLinks().count() > 1) { - QGCMessageBox::warning("Airframe Config", "You cannot change airframe configuration while connected to multiple vehicles."); - return; - } - + if (UASManager::instance()->getUASList().count() > 1) { + QGCMessageBox::warning("Airframe Config", "You cannot change airframe configuration while connected to multiple vehicles."); + return; + } + _autoPilotPlugin->getParameterFact("SYS_AUTOSTART")->setValue(_autostartId); _autoPilotPlugin->getParameterFact("SYS_AUTOCONFIG")->setValue(1);