diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp index 556bfb315..1421af770 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp @@ -47,7 +47,7 @@ AirframeInitialTuningPage::~AirframeInitialTuningPage() void AirframeInitialTuningPage::initializePage() { - ui->selectorWidget->setTemplateInfo(getWizard()->getVehicleType(), getWizard()->getVehicleSubType()); + ui->selectorWidget->setTemplateInfo(getWizard()->getVehicleType(), getWizard()->getVehicleSubType(), false); } bool AirframeInitialTuningPage::validatePage() diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp index 301a49e16..5e0dae3dd 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp @@ -64,7 +64,7 @@ VehicleTemplateExportDialog::VehicleTemplateExportDialog(QWidget *parent) : m_uavoManager = pm->getObject(); ui->Photo->setScene(new QGraphicsScene(this)); ui->Type->setText(setupVehicleType()); - ui->selectionWidget->setTemplateInfo(m_type, m_subType); + ui->selectionWidget->setTemplateInfo(m_type, m_subType, true); connect(ui->Name, SIGNAL(textChanged(QString)), this, SLOT(updateStatus())); connect(ui->Owner, SIGNAL(textChanged(QString)), this, SLOT(updateStatus())); @@ -229,7 +229,7 @@ void VehicleTemplateExportDialog::saveTemplate(QString path) QJsonDocument saveDoc(exportObject); - const char *fileType = ".optmpl"; + const char *fileType = ".vtmpl"; QString fileName = QString("%1-%2-%3%4") .arg(fixFilenameString(ui->Name->text(), 20)) @@ -240,7 +240,7 @@ void VehicleTemplateExportDialog::saveTemplate(QString path) QString fullPath; if (path.isEmpty()) { fullPath = QString("%1%2%3").arg(QDir::homePath()).arg(QDir::separator()).arg(fileName); - fullPath = QFileDialog::getSaveFileName(this, tr("Export settings"), fullPath, QString("%1 (*%2)").arg(tr("OPTemplates"), fileType)); + fullPath = QFileDialog::getSaveFileName(this, tr("Export settings"), fullPath, QString("%1 (*%2)").arg(tr("VehicleTemplates"), fileType)); } else { fullPath = QString("%1%2%3").arg(path).arg(QDir::separator()).arg(fileName); } @@ -272,7 +272,7 @@ QString VehicleTemplateExportDialog::fixFilenameString(QString input, int trunca void VehicleTemplateExportDialog::exportTemplate() { - QString path = QString("%1%2%3%4").arg(Utils::InsertStoragePath("%%STOREPATH%%cloudconfig")) + QString path = QString("%1%2%3%4").arg(Utils::InsertStoragePath("%%STOREPATH%%vehicletemplates")) .arg(QDir::separator()).arg(getTypeDirectory()).arg(QDir::separator()); QDir dir; diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.ui b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.ui index abbbb70f3..d2069645c 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.ui +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.ui @@ -19,17 +19,11 @@ 700 - - - 610 - 700 - - Vehicle Templates - false + true true diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.cpp index 3352a715d..23ffe1ad0 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.cpp @@ -31,6 +31,8 @@ #include #include #include +#include +#include #include "vehicletemplateexportdialog.h" #include "utils/pathutils.h" @@ -41,12 +43,14 @@ VehicleTemplateSelectorWidget::VehicleTemplateSelectorWidget(QWidget *parent) : ui->setupUi(this); ui->templateImage->setScene(new QGraphicsScene()); connect(ui->templateList, SIGNAL(itemSelectionChanged()), this, SLOT(templateSelectionChanged())); + connect(ui->deleteTemplateButton, SIGNAL(clicked()), this, SLOT(deleteSelectedTemplate())); + connect(ui->addTemplateButton, SIGNAL(clicked()), this, SLOT(addTemplate())); } VehicleTemplateSelectorWidget::~VehicleTemplateSelectorWidget() { ui->templateList->clear(); - foreach(QJsonObject * templ, m_templates.values()) { + foreach(VehicleTemplate * templ, m_templates.values()) { delete templ; } m_templates.clear(); @@ -54,8 +58,9 @@ VehicleTemplateSelectorWidget::~VehicleTemplateSelectorWidget() delete ui; } -void VehicleTemplateSelectorWidget::setTemplateInfo(int vehicleType, int vehicleSubType) +void VehicleTemplateSelectorWidget::setTemplateInfo(int vehicleType, int vehicleSubType, bool showTemplateControls) { + ui->buttonFrame->setVisible(showTemplateControls); m_vehicleType = vehicleType; m_vehicleSubType = vehicleSubType; updateTemplates(); @@ -69,12 +74,84 @@ QJsonObject *VehicleTemplateSelectorWidget::selectedTemplate() const return NULL; } +bool VehicleTemplateSelectorWidget::selectedTemplateEditable() const +{ + if (ui->templateList->currentRow() >= 0) { + return ui->templateList->item(ui->templateList->currentRow())->data(Qt::UserRole + 2).value(); + } + return false; +} + +QString VehicleTemplateSelectorWidget::selectedTemplatePath() const +{ + if (ui->templateList->currentRow() >= 0) { + return ui->templateList->item(ui->templateList->currentRow())->data(Qt::UserRole + 3).value(); + } + return ""; +} + void VehicleTemplateSelectorWidget::updateTemplates() { loadValidFiles(); setupTemplateList(); } +void VehicleTemplateSelectorWidget::deleteSelectedTemplate() +{ + if (selectedTemplateEditable()) { + if (QMessageBox::question(this, tr("Delete Vehicle Template"), + "Are you sure you want to delete the selected template?", + QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { + QFile fileToDelete(selectedTemplatePath()); + if (fileToDelete.remove()) { + QJsonObject *templObj = selectedTemplate(); + if (templObj) { + VehicleTemplate *templ = m_templates[templObj->value("uuid").toString()]; + m_templates.remove(templObj->value("uuid").toString()); + delete templ; + } + delete ui->templateList->item(ui->templateList->currentRow()); + } + } + } +} + +void VehicleTemplateSelectorWidget::addTemplate() +{ + QString path = QFileDialog::getOpenFileName(this, tr("Add settings"), QDir::homePath(), + tr("Vehicle Template Files (*.vtmpl *.optmpl)")); + + if (path != NULL) { + QFile file(path); + + if (file.open(QFile::ReadOnly)) { + QByteArray jsonData = file.readAll(); + QJsonParseError error; + QJsonDocument templateDoc = QJsonDocument::fromJson(jsonData, &error); + if (error.error == QJsonParseError::NoError) { + QJsonObject json = templateDoc.object(); + if (airframeIsCompatible(json["type"].toInt(), json["subtype"].toInt())) { + QFileInfo fInfo(file); + QString destinationFilePath = QString("%1/%2").arg(Utils::InsertStoragePath("%%STOREPATH%%vehicletemplates")) + .arg(getTemplatePath()); + QDir dir; + if (dir.mkpath(destinationFilePath) && file.copy(QString("%1/%2").arg(destinationFilePath).arg(fInfo.fileName()))) { + updateTemplates(); + } else { + QMessageBox::critical(this, tr("Error"), tr("The selected template file could not be added.")); + } + } else { + QMessageBox::critical(this, tr("Error"), tr("The selected template file is not compatible with the current vehicle type.")); + } + } else { + QMessageBox::critical(this, tr("Error"), tr("The selected template file is corrupt or of an unknown version.")); + } + } else { + QMessageBox::critical(this, tr("Error"), tr("The selected template file could not be opened.")); + } + } +} + void VehicleTemplateSelectorWidget::updatePhoto(QJsonObject *templ) { QPixmap photo; @@ -115,7 +192,7 @@ void VehicleTemplateSelectorWidget::updateDescription(QJsonObject *templ) ui->templateDescription->setText(description); } else { ui->templateDescription->setText(tr("This option will use the current tuning settings saved on the controller, if your controller " - "is currently unconfigured, then the OpenPilot firmware defaults will be used.\n\n" + "is currently unconfigured, then the pre-configured firmware defaults will be used.\n\n" "It is suggested that if this is a first time configuration of your controller, rather than " "use this option, instead select a tuning set that matches your own airframe as close as " "possible from the list above or if you are not able to fine one, then select the generic item " @@ -129,6 +206,7 @@ void VehicleTemplateSelectorWidget::templateSelectionChanged() QJsonObject *templ = selectedTemplate(); updatePhoto(templ); updateDescription(templ); + ui->deleteTemplateButton->setEnabled(selectedTemplateEditable()); } } @@ -161,18 +239,20 @@ QString VehicleTemplateSelectorWidget::getTemplatePath() } } -void VehicleTemplateSelectorWidget::loadFilesInDir(QString templateBasePath) +void VehicleTemplateSelectorWidget::loadFilesInDir(QString templateBasePath, bool local) { QDir templateDir(templateBasePath); qDebug() << "Loading templates from base path:" << templateBasePath; QStringList names; names << "*.optmpl"; + names << "*.vtmpl"; // Vehicle template templateDir.setNameFilters(names); templateDir.setSorting(QDir::Name); QStringList files = templateDir.entryList(); foreach(QString fileName, files) { - QFile file(QString("%1/%2").arg(templateDir.absolutePath()).arg(fileName)); + QString fullPathName = QString("%1/%2").arg(templateDir.absolutePath()).arg(fileName); + QFile file(fullPathName); if (file.open(QFile::ReadOnly)) { QByteArray jsonData = file.readAll(); @@ -183,7 +263,7 @@ void VehicleTemplateSelectorWidget::loadFilesInDir(QString templateBasePath) if (airframeIsCompatible(json["type"].toInt(), json["subtype"].toInt())) { QString uuid = json["uuid"].toString(); if (!m_templates.contains(uuid)) { - m_templates[json["uuid"].toString()] = new QJsonObject(json); + m_templates[json["uuid"].toString()] = new VehicleTemplate(new QJsonObject(json), local, fullPathName); } } } else { @@ -198,13 +278,13 @@ void VehicleTemplateSelectorWidget::loadFilesInDir(QString templateBasePath) void VehicleTemplateSelectorWidget::loadValidFiles() { ui->templateList->clear(); - foreach(QJsonObject * templ, m_templates.values()) { + foreach(VehicleTemplate * templ, m_templates.values()) { delete templ; } m_templates.clear(); QString path = getTemplatePath(); - loadFilesInDir(QString("%1/%2/").arg(Utils::InsertDataPath("%%DATAPATH%%cloudconfig")).arg(path)); - loadFilesInDir(QString("%1/%2/").arg(Utils::InsertStoragePath("%%STOREPATH%%cloudconfig")).arg(path)); + loadFilesInDir(QString("%1/%2/").arg(Utils::InsertDataPath("%%DATAPATH%%vehicletemplates")).arg(path), false); + loadFilesInDir(QString("%1/%2/").arg(Utils::InsertStoragePath("%%STOREPATH%%vehicletemplates")).arg(path), true); } void VehicleTemplateSelectorWidget::setupTemplateList() @@ -212,10 +292,18 @@ void VehicleTemplateSelectorWidget::setupTemplateList() QListWidgetItem *item; foreach(QString templ, m_templates.keys()) { - QJsonObject *json = m_templates[templ]; + VehicleTemplate *vtemplate = m_templates[templ]; - item = new QListWidgetItem(json->value("name").toString(), ui->templateList); - item->setData(Qt::UserRole + 1, QVariant::fromValue(json)); + item = new QListWidgetItem(vtemplate->templateObject()->value("name").toString(), ui->templateList); + item->setData(Qt::UserRole + 1, QVariant::fromValue(vtemplate->templateObject())); + item->setData(Qt::UserRole + 2, QVariant::fromValue(vtemplate->editable())); + if (vtemplate->editable()) { + item->setData(Qt::ForegroundRole, QVariant::fromValue(QColor(Qt::darkGreen))); + item->setData(Qt::ToolTipRole, QVariant::fromValue(tr("Local template."))); + } else { + item->setData(Qt::ToolTipRole, QVariant::fromValue(tr("Built-in template."))); + } + item->setData(Qt::UserRole + 3, QVariant::fromValue(vtemplate->templatePath())); } ui->templateList->sortItems(Qt::AscendingOrder); diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.h b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.h index 2f86f39ee..0fd37f18c 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.h @@ -36,15 +36,47 @@ namespace Ui { class VehicleTemplateSelectorWidget; } +class VehicleTemplate { +public: + VehicleTemplate(QJsonObject *templateObject, bool editable, QString templatePath) : + m_templateObject(templateObject), m_editable(editable), m_templatePath(templatePath) {} + + ~VehicleTemplate() + { + if (m_templateObject) { + delete m_templateObject; + } + } + + QJsonObject *templateObject() + { + return m_templateObject; + } + + bool editable() + { + return m_editable; + } + + QString templatePath() + { + return m_templatePath; + } + +private: + QJsonObject *m_templateObject; + bool m_editable; + QString m_templatePath; +}; + class VehicleTemplateSelectorWidget : public QWidget { Q_OBJECT public: explicit VehicleTemplateSelectorWidget(QWidget *parent = 0); ~VehicleTemplateSelectorWidget(); - void setTemplateInfo(int vehicleType, int vehicleSubType); + void setTemplateInfo(int vehicleType, int vehicleSubType, bool showTemplateControls); QJsonObject *selectedTemplate() const; - public slots: void templateSelectionChanged(); @@ -57,20 +89,24 @@ private: int m_vehicleType; int m_vehicleSubType; - QMap m_templates; + QMap m_templates; QGraphicsPixmapItem *m_photoItem; void loadValidFiles(); - void loadFilesInDir(QString templateBasePath); + void loadFilesInDir(QString templateBasePath, bool local); void setupTemplateList(); QString getTemplateKey(QJsonObject *templ); void updatePhoto(QJsonObject *templ); void updateDescription(QJsonObject *templ); bool airframeIsCompatible(int vehicleType, int vehicleSubType); QString getTemplatePath(); + bool selectedTemplateEditable() const; + QString selectedTemplatePath() const; private slots: void updateTemplates(); + void deleteSelectedTemplate(); + void addTemplate(); }; Q_DECLARE_METATYPE(QJsonObject *) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.ui b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.ui index 20caa1f19..c0a07e9ff 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.ui +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateselectorwidget.ui @@ -13,71 +13,160 @@ Form - + + + 0 + + + 0 + + + 0 + + + 0 + - - - + + + Qt::Vertical + + + + + 6 + - + + + + 0 + 300 + + Qt::ScrollBarAlwaysOn + + Qt::ScrollBarAlwaysOff + QAbstractItemView::NoEditTriggers + + false + - - - - 250 - 250 - - - - background-color: rgba(254, 254, 254, 0); - - - false - - - QPainter::Antialiasing|QPainter::HighQualityAntialiasing|QPainter::TextAntialiasing - - + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Add... + + + + + + + false + + + Delete + + + + + + + - - - - 0 - 0 - + + + + 200 + 200 + - - - 10 - + + background-color: rgba(254, 254, 254, 0); - + false - - true + + QPainter::Antialiasing|QPainter::HighQualityAntialiasing|QPainter::SmoothPixmapTransform|QPainter::TextAntialiasing - - Information about the Vehicle in short. + + QGraphicsView::AnchorViewCenter - - + + + + + 0 + 0 + + + + + 10 + + + + false + + + true + + + Information about the Vehicle in short. + + + diff --git a/ground/openpilotgcs/src/share/cloudconfig/surface/whats_this.txt b/ground/openpilotgcs/src/share/cloudconfig/surface/whats_this.txt deleted file mode 100644 index 846347661..000000000 --- a/ground/openpilotgcs/src/share/cloudconfig/surface/whats_this.txt +++ /dev/null @@ -1 +0,0 @@ -This folder is here to host downloaded or bundled vehicle settings template files (.optmpl). diff --git a/ground/openpilotgcs/src/share/copydata.pro b/ground/openpilotgcs/src/share/copydata.pro index a24016b1d..6915503ae 100644 --- a/ground/openpilotgcs/src/share/copydata.pro +++ b/ground/openpilotgcs/src/share/copydata.pro @@ -2,7 +2,7 @@ include(../../openpilotgcs.pri) TEMPLATE = aux -DATACOLLECTIONS = cloudconfig configurations dials models pfd sounds diagrams mapicons stylesheets +DATACOLLECTIONS = vehicletemplates configurations dials models pfd sounds diagrams mapicons stylesheets equals(copydata, 1) { for(dir, DATACOLLECTIONS) { diff --git a/ground/openpilotgcs/src/share/cloudconfig/custom/whats_this.txt b/ground/openpilotgcs/src/share/vehicletemplates/custom/whats_this.txt similarity index 62% rename from ground/openpilotgcs/src/share/cloudconfig/custom/whats_this.txt rename to ground/openpilotgcs/src/share/vehicletemplates/custom/whats_this.txt index 846347661..135a832c8 100644 --- a/ground/openpilotgcs/src/share/cloudconfig/custom/whats_this.txt +++ b/ground/openpilotgcs/src/share/vehicletemplates/custom/whats_this.txt @@ -1 +1 @@ -This folder is here to host downloaded or bundled vehicle settings template files (.optmpl). +This folder is here to host downloaded or bundled vehicle settings template files (*.vtmpl, *.optmpl). diff --git a/ground/openpilotgcs/src/share/cloudconfig/fixedwing/SoniModelMako-FixedWing-Elevon-7134e8ae5ce.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/fixedwing/SoniModelMako-FixedWing-Elevon-7134e8ae5ce.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/fixedwing/SoniModelMako-FixedWing-Elevon-7134e8ae5ce.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/fixedwing/SoniModelMako-FixedWing-Elevon-7134e8ae5ce.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/fixedwing/Toro900-VoilureFixe-Elevon-d4a58d2cd50.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/fixedwing/Toro900-VoilureFixe-Elevon-d4a58d2cd50.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/fixedwing/Toro900-VoilureFixe-Elevon-d4a58d2cd50.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/fixedwing/Toro900-VoilureFixe-Elevon-d4a58d2cd50.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/fixedwing/whats_this.txt b/ground/openpilotgcs/src/share/vehicletemplates/fixedwing/whats_this.txt similarity index 62% rename from ground/openpilotgcs/src/share/cloudconfig/fixedwing/whats_this.txt rename to ground/openpilotgcs/src/share/vehicletemplates/fixedwing/whats_this.txt index 846347661..135a832c8 100644 --- a/ground/openpilotgcs/src/share/cloudconfig/fixedwing/whats_this.txt +++ b/ground/openpilotgcs/src/share/vehicletemplates/fixedwing/whats_this.txt @@ -1 +1 @@ -This folder is here to host downloaded or bundled vehicle settings template files (.optmpl). +This folder is here to host downloaded or bundled vehicle settings template files (*.vtmpl, *.optmpl). diff --git a/ground/openpilotgcs/src/share/cloudconfig/helicopter/whats_this.txt b/ground/openpilotgcs/src/share/vehicletemplates/helicopter/whats_this.txt similarity index 62% rename from ground/openpilotgcs/src/share/cloudconfig/helicopter/whats_this.txt rename to ground/openpilotgcs/src/share/vehicletemplates/helicopter/whats_this.txt index 846347661..135a832c8 100644 --- a/ground/openpilotgcs/src/share/cloudconfig/helicopter/whats_this.txt +++ b/ground/openpilotgcs/src/share/vehicletemplates/helicopter/whats_this.txt @@ -1 +1 @@ -This folder is here to host downloaded or bundled vehicle settings template files (.optmpl). +This folder is here to host downloaded or bundled vehicle settings template files (*.vtmpl, *.optmpl). diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/(RACE)FPV260HobbyKin-Multirotor-QuadrocopterX-0482b7a25f7.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/(RACE)FPV260HobbyKin-Multirotor-QuadrocopterX-0482b7a25f7.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/(RACE)FPV260HobbyKin-Multirotor-QuadrocopterX-0482b7a25f7.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/(RACE)FPV260HobbyKin-Multirotor-QuadrocopterX-0482b7a25f7.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/(STOCK)HobbyKingFPV2-Multirotor-QuadrocopterX-0bb44b68883.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/(STOCK)HobbyKingFPV2-Multirotor-QuadrocopterX-0bb44b68883.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/(STOCK)HobbyKingFPV2-Multirotor-QuadrocopterX-0bb44b68883.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/(STOCK)HobbyKingFPV2-Multirotor-QuadrocopterX-0bb44b68883.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/ARRISX-SPEEDFPV250-Unsupported-2cbaaa14a01.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/ARRISX-SPEEDFPV250-Unsupported-2cbaaa14a01.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/ARRISX-SPEEDFPV250-Unsupported-2cbaaa14a01.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/ARRISX-SPEEDFPV250-Unsupported-2cbaaa14a01.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/BlackOutB330-Multirotor-QuadrocopterX-e9980c55302.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/BlackOutB330-Multirotor-QuadrocopterX-e9980c55302.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/BlackOutB330-Multirotor-QuadrocopterX-e9980c55302.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/BlackOutB330-Multirotor-QuadrocopterX-e9980c55302.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/BlackOutMiniH-Multirotor-QuadrocopterX-d415c242154.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/BlackOutMiniH-Multirotor-QuadrocopterX-d415c242154.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/BlackOutMiniH-Multirotor-QuadrocopterX-d415c242154.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/BlackOutMiniH-Multirotor-QuadrocopterX-d415c242154.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/DJIF450-Multirotor-QuadrocopterX-cfa8ec67993.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/DJIF450-Multirotor-QuadrocopterX-cfa8ec67993.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/DJIF450-Multirotor-QuadrocopterX-cfa8ec67993.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/DJIF450-Multirotor-QuadrocopterX-cfa8ec67993.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/DroneframesDRQ250-cf-rc5 Multirotor-QuadrocopterX-425b90123f1.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/DroneframesDRQ250-cf-rc5 Multirotor-QuadrocopterX-425b90123f1.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/DroneframesDRQ250-cf-rc5 Multirotor-QuadrocopterX-425b90123f1.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/DroneframesDRQ250-cf-rc5 Multirotor-QuadrocopterX-425b90123f1.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/DroneframesDRQ430G-revo-rc5Multirotor-QuadrocopterX-fae90503b3f.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/DroneframesDRQ430G-revo-rc5Multirotor-QuadrocopterX-fae90503b3f.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/DroneframesDRQ430G-revo-rc5Multirotor-QuadrocopterX-fae90503b3f.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/DroneframesDRQ430G-revo-rc5Multirotor-QuadrocopterX-fae90503b3f.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/EmaxNighthawk-Multirotor-QuadrocopterX-9a3aa9d9726.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/EmaxNighthawk-Multirotor-QuadrocopterX-9a3aa9d9726.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/EmaxNighthawk-Multirotor-QuadrocopterX-9a3aa9d9726.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/EmaxNighthawk-Multirotor-QuadrocopterX-9a3aa9d9726.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/FlipFPVPro-Multirotor-QuadrocopterX-9eb7b719244.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/FlipFPVPro-Multirotor-QuadrocopterX-9eb7b719244.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/FlipFPVPro-Multirotor-QuadrocopterX-9eb7b719244.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/FlipFPVPro-Multirotor-QuadrocopterX-9eb7b719244.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/FlipFpvPro-Multirotor-QuadrocopterX-c117d151f95.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/FlipFpvPro-Multirotor-QuadrocopterX-c117d151f95.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/FlipFpvPro-Multirotor-QuadrocopterX-c117d151f95.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/FlipFpvPro-Multirotor-QuadrocopterX-c117d151f95.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/FlipSport-Multirotor-QuadrocopterX-c27ae7b79ca.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/FlipSport-Multirotor-QuadrocopterX-c27ae7b79ca.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/FlipSport-Multirotor-QuadrocopterX-c27ae7b79ca.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/FlipSport-Multirotor-QuadrocopterX-c27ae7b79ca.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/FlyingCinemaCinetan-Multirotor-QuadrocopterX-2c3f9181872.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/FlyingCinemaCinetan-Multirotor-QuadrocopterX-2c3f9181872.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/FlyingCinemaCinetan-Multirotor-QuadrocopterX-2c3f9181872.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/FlyingCinemaCinetan-Multirotor-QuadrocopterX-2c3f9181872.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/FlyingCinemaTankitoM-Multirotor-QuadrocopterX-385d9ac9ae1.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/FlyingCinemaTankitoM-Multirotor-QuadrocopterX-385d9ac9ae1.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/FlyingCinemaTankitoM-Multirotor-QuadrocopterX-385d9ac9ae1.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/FlyingCinemaTankitoM-Multirotor-QuadrocopterX-385d9ac9ae1.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericHexa-Multirotor-Hexacopter+-c50a904f4a3.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericHexa-Multirotor-Hexacopter+-c50a904f4a3.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericHexa-Multirotor-Hexacopter+-c50a904f4a3.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericHexa-Multirotor-Hexacopter+-c50a904f4a3.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericHexaH-Multirotor-HexacopterH-6cc3fed9073.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericHexaH-Multirotor-HexacopterH-6cc3fed9073.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericHexaH-Multirotor-HexacopterH-6cc3fed9073.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericHexaH-Multirotor-HexacopterH-6cc3fed9073.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericHexaX-Multirotor-HexacopterX-b3b8c1d2f3c.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericHexaX-Multirotor-HexacopterX-b3b8c1d2f3c.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericHexaX-Multirotor-HexacopterX-b3b8c1d2f3c.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericHexaX-Multirotor-HexacopterX-b3b8c1d2f3c.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericHexaY6-Multirotor-HexacopterY6-0b5dc6bae4f.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericHexaY6-Multirotor-HexacopterY6-0b5dc6bae4f.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericHexaY6-Multirotor-HexacopterY6-0b5dc6bae4f.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericHexaY6-Multirotor-HexacopterY6-0b5dc6bae4f.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericQuad+-Multirotor-Quadrocopter+-a87a4226820.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericQuad+-Multirotor-Quadrocopter+-a87a4226820.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericQuad+-Multirotor-Quadrocopter+-a87a4226820.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericQuad+-Multirotor-Quadrocopter+-a87a4226820.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericQuadX-Multirotor-QuadrocopterX-5fce7315a5b.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericQuadX-Multirotor-QuadrocopterX-5fce7315a5b.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericQuadX-Multirotor-QuadrocopterX-5fce7315a5b.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericQuadX-Multirotor-QuadrocopterX-5fce7315a5b.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericTricopter-Multirotor-Tricopter-5f46bc37c31.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericTricopter-Multirotor-Tricopter-5f46bc37c31.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/GenericTricopter-Multirotor-Tricopter-5f46bc37c31.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/GenericTricopter-Multirotor-Tricopter-5f46bc37c31.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/GuerrillaDronesToadQ-Multirotor-QuadrocopterX-8f838e43432.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/GuerrillaDronesToadQ-Multirotor-QuadrocopterX-8f838e43432.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/GuerrillaDronesToadQ-Multirotor-QuadrocopterX-8f838e43432.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/GuerrillaDronesToadQ-Multirotor-QuadrocopterX-8f838e43432.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/HKingDYS250CarbonFib-Multirotor-QuadrocopterX-969354c51c1.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/HKingDYS250CarbonFib-Multirotor-QuadrocopterX-969354c51c1.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/HKingDYS250CarbonFib-Multirotor-QuadrocopterX-969354c51c1.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/HKingDYS250CarbonFib-Multirotor-QuadrocopterX-969354c51c1.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/HKingDYS320CarbonFib-Multirotor-QuadrocopterX-0b41edda68f.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/HKingDYS320CarbonFib-Multirotor-QuadrocopterX-0b41edda68f.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/HKingDYS320CarbonFib-Multirotor-QuadrocopterX-0b41edda68f.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/HKingDYS320CarbonFib-Multirotor-QuadrocopterX-0b41edda68f.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/HoverThingsFLIPFPV-Multirotor-QuadrocopterX-32bf14a10fc.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/HoverThingsFLIPFPV-Multirotor-QuadrocopterX-32bf14a10fc.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/HoverThingsFLIPFPV-Multirotor-QuadrocopterX-32bf14a10fc.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/HoverThingsFLIPFPV-Multirotor-QuadrocopterX-32bf14a10fc.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/InventorsSparrowRace-Multirotor-QuadrocopterX-314fff867fd.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/InventorsSparrowRace-Multirotor-QuadrocopterX-314fff867fd.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/InventorsSparrowRace-Multirotor-QuadrocopterX-314fff867fd.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/InventorsSparrowRace-Multirotor-QuadrocopterX-314fff867fd.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/QAV250-Multirotor-QuadrocopterX-181dab0df01.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/QAV250-Multirotor-QuadrocopterX-181dab0df01.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/QAV250-Multirotor-QuadrocopterX-181dab0df01.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/QAV250-Multirotor-QuadrocopterX-181dab0df01.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/QAV400-Multirotor-QuadrocopterX-90a90b9fb50.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/QAV400-Multirotor-QuadrocopterX-90a90b9fb50.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/QAV400-Multirotor-QuadrocopterX-90a90b9fb50.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/QAV400-Multirotor-QuadrocopterX-90a90b9fb50.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/QAV500-Multirotor-QuadrocopterX-6da440c4d7c.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/QAV500-Multirotor-QuadrocopterX-6da440c4d7c.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/QAV500-Multirotor-QuadrocopterX-6da440c4d7c.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/QAV500-Multirotor-QuadrocopterX-6da440c4d7c.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/QUADI250-Multirotor-QuadrocopterX-c6c6cfc4cf9.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/QUADI250-Multirotor-QuadrocopterX-c6c6cfc4cf9.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/QUADI250-Multirotor-QuadrocopterX-c6c6cfc4cf9.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/QUADI250-Multirotor-QuadrocopterX-c6c6cfc4cf9.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/RCExplorerV3Tricopte-Multirotor-Tricopter-dcbce3f069c.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/RCExplorerV3Tricopte-Multirotor-Tricopter-dcbce3f069c.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/RCExplorerV3Tricopte-Multirotor-Tricopter-dcbce3f069c.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/RCExplorerV3Tricopte-Multirotor-Tricopter-dcbce3f069c.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/RD290MiniHexfpv-Multirotor-HexacopterX-6587232be1a.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/RD290MiniHexfpv-Multirotor-HexacopterX-6587232be1a.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/RD290MiniHexfpv-Multirotor-HexacopterX-6587232be1a.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/RD290MiniHexfpv-Multirotor-HexacopterX-6587232be1a.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/XhoverMXP230Elite-Multirotor-QuadrocopterX-3b169a4fd1b.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/XhoverMXP230Elite-Multirotor-QuadrocopterX-3b169a4fd1b.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/XhoverMXP230Elite-Multirotor-QuadrocopterX-3b169a4fd1b.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/XhoverMXP230Elite-Multirotor-QuadrocopterX-3b169a4fd1b.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/ZMR250( Attitude mode)-ChineseQAV250-Multirotor-QuadrocopterX-5d318c0526c (1).optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/ZMR250( Attitude mode)-ChineseQAV250-Multirotor-QuadrocopterX-5d318c0526c (1).optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/ZMR250( Attitude mode)-ChineseQAV250-Multirotor-QuadrocopterX-5d318c0526c (1).optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/ZMR250( Attitude mode)-ChineseQAV250-Multirotor-QuadrocopterX-5d318c0526c (1).optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/ZMR250(4s race)-Multirotor-QuadrocopterX-fac61e7adb8.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/ZMR250(4s race)-Multirotor-QuadrocopterX-fac61e7adb8.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/ZMR250(4s race)-Multirotor-QuadrocopterX-fac61e7adb8.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/ZMR250(4s race)-Multirotor-QuadrocopterX-fac61e7adb8.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/ZMR250(Race acro +)-Multirotor-QuadrocopterX-895b222d670.optmpl b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/ZMR250(Race acro +)-Multirotor-QuadrocopterX-895b222d670.optmpl similarity index 100% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/ZMR250(Race acro +)-Multirotor-QuadrocopterX-895b222d670.optmpl rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/ZMR250(Race acro +)-Multirotor-QuadrocopterX-895b222d670.optmpl diff --git a/ground/openpilotgcs/src/share/cloudconfig/multirotor/whats_this.txt b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/whats_this.txt similarity index 62% rename from ground/openpilotgcs/src/share/cloudconfig/multirotor/whats_this.txt rename to ground/openpilotgcs/src/share/vehicletemplates/multirotor/whats_this.txt index 846347661..135a832c8 100644 --- a/ground/openpilotgcs/src/share/cloudconfig/multirotor/whats_this.txt +++ b/ground/openpilotgcs/src/share/vehicletemplates/multirotor/whats_this.txt @@ -1 +1 @@ -This folder is here to host downloaded or bundled vehicle settings template files (.optmpl). +This folder is here to host downloaded or bundled vehicle settings template files (*.vtmpl, *.optmpl). diff --git a/ground/openpilotgcs/src/share/vehicletemplates/surface/whats_this.txt b/ground/openpilotgcs/src/share/vehicletemplates/surface/whats_this.txt new file mode 100644 index 000000000..135a832c8 --- /dev/null +++ b/ground/openpilotgcs/src/share/vehicletemplates/surface/whats_this.txt @@ -0,0 +1 @@ +This folder is here to host downloaded or bundled vehicle settings template files (*.vtmpl, *.optmpl).