diff --git a/src/ui/QGCPX4VehicleConfig.cc b/src/ui/QGCPX4VehicleConfig.cc index b63b0c5248189ed1870703a0032613f4bc92ebc6..3ee0c175b9d9380bc46a559a57fbe57aada6dc07 100644 --- a/src/ui/QGCPX4VehicleConfig.cc +++ b/src/ui/QGCPX4VehicleConfig.cc @@ -204,12 +204,12 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary) if (!autopilotdir.exists("general")) { //TODO: Throw some kind of error here. There is no general configuration directory - qWarning() << "Invalid general dir. no general configuration will be loaded."; + qDebug() << "Invalid general dir. no general configuration will be loaded."; } if (!autopilotdir.exists(mav->getAutopilotTypeName().toLower())) { //TODO: Throw an error here too, no autopilot specific configuration - qWarning() << "Invalid vehicle dir, no vehicle specific configuration will be loaded."; + qDebug() << "Invalid vehicle dir, no vehicle specific configuration will be loaded."; } // Generate widgets for the General tab. @@ -380,23 +380,10 @@ void QGCPX4VehicleConfig::loadConfig() QGCToolWidget* tool; QDir autopilotdir(qApp->applicationDirPath() + "/files/" + mav->getAutopilotTypeName().toLower()); - QDir generaldir = QDir(autopilotdir.absolutePath() + "/general/widgets"); - QDir vehicledir = QDir(autopilotdir.absolutePath() + "/" + mav->getSystemTypeName().toLower() + "/widgets"); - if (!autopilotdir.exists("general")) - { - //TODO: Throw some kind of error here. There is no general configuration directory - qWarning() << "Invalid general dir. no general configuration will be loaded."; - } - if (!autopilotdir.exists(mav->getAutopilotTypeName().toLower())) - { - //TODO: Throw an error here too, no autopilot specific configuration - qWarning() << "Invalid vehicle dir, no vehicle specific configuration will be loaded."; - } qDebug() << autopilotdir.absolutePath(); - qDebug() << generaldir.absolutePath(); - qDebug() << vehicledir.absolutePath(); + QFile xmlfile(autopilotdir.absolutePath() + "/arduplane.pdef.xml"); - if (xmlfile.exists() && !xmlfile.open(QIODevice::ReadOnly)) + if (!xmlfile.open(QIODevice::ReadOnly)) { loadQgcConfig(false); doneLoadingConfig = true;