diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp index 11f2aee00..a770de2dd 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp @@ -398,7 +398,7 @@ void ConfigCcpmWidget::UpdateType() // Clear advanced settings table if not Custom selected (Keep previous settings) if (TypeText.compare(QString::fromUtf8("Custom - Advanced Settings"), Qt::CaseInsensitive) != 0) { - m_aircraft->ccpmAdvancedSettingsTable->clearFocus(); + m_aircraft->ccpmAdvancedSettingsTable->clearFocus(); } m_aircraft->ccpmAngleW->setEnabled(TypeInt == 1); @@ -695,7 +695,7 @@ void ConfigCcpmWidget::UpdateMixer() ; } } - int TypeInt = m_aircraft->ccpmType->count() - m_aircraft->ccpmType->currentIndex() - 1; + int TypeInt = m_aircraft->ccpmType->count() - m_aircraft->ccpmType->currentIndex() - 1; if (TypeInt != 0) { // not advanced settings // get the channel data from the ui MixerChannelData[0] = m_aircraft->ccpmEngineChannel->currentIndex(); @@ -796,7 +796,7 @@ void ConfigCcpmWidget::UpdateMixer() Channel = QString((int)ConfigCcpmWidget::CHANNEL_NUMELEM + 1); } MixerChannelData[i] = Channel.toInt(); - } + } } } diff --git a/ground/openpilotgcs/src/plugins/setupwizard/connectiondiagram.cpp b/ground/openpilotgcs/src/plugins/setupwizard/connectiondiagram.cpp index f0e473657..d20c95397 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/connectiondiagram.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/connectiondiagram.cpp @@ -167,7 +167,8 @@ void ConnectionDiagram::setupGraphicsScene() case VehicleConfigurationSource::CONTROLLER_CC: case VehicleConfigurationSource::CONTROLLER_CC3D: prefix = "cc-"; - if (m_configSource->getEscType() == VehicleConfigurationSource::ESC_ONESHOT) { + if (m_configSource->getEscType() == VehicleConfigurationSource::ESC_ONESHOT || + m_configSource->getEscType() == VehicleConfigurationSource::ESC_RAPID) { suffix = "-oneshot"; } break; diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp index 0d279385a..428521e3d 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp @@ -169,15 +169,11 @@ bool AirframeInitialTuningPage::airframeIsCompatible(int vehicleType, int vehicl } } -void AirframeInitialTuningPage::loadValidFiles() +void AirframeInitialTuningPage::loadFilesInDir(QString templateBasePath) { - ui->templateList->clear(); - foreach(QJsonObject * templ, m_templates.values()) { - delete templ; - } - m_templates.clear(); + QDir templateDir(templateBasePath); - QDir templateDir(QString("%1/%2/").arg(Utils::PathUtils().InsertDataPath("%%DATAPATH%%cloudconfig")).arg(m_dir)); + qDebug() << "Loading templates from base path:" << templateBasePath; QStringList names; names << "*.optmpl"; templateDir.setNameFilters(names); @@ -207,6 +203,18 @@ void AirframeInitialTuningPage::loadValidFiles() } } +void AirframeInitialTuningPage::loadValidFiles() +{ + ui->templateList->clear(); + foreach(QJsonObject * templ, m_templates.values()) { + delete templ; + } + m_templates.clear(); + + loadFilesInDir(QString("%1/%2/").arg(Utils::PathUtils().InsertDataPath("%%DATAPATH%%cloudconfig")).arg(m_dir)); + loadFilesInDir(QString("%1/%2/").arg(Utils::PathUtils().InsertStoragePath("%%STOREPATH%%cloudconfig")).arg(m_dir)); +} + void AirframeInitialTuningPage::setupTemplateList() { QListWidgetItem *item; diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.h b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.h index 258beb9d1..fecad62bf 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.h @@ -44,7 +44,6 @@ public: void initializePage(); bool validatePage(); bool isComplete() const; - public slots: void templateSelectionChanged(); @@ -59,6 +58,7 @@ private: QGraphicsPixmapItem *m_photoItem; void loadValidFiles(); + void loadFilesInDir(QString templateBasePath); void setupTemplateList(); QString getTemplateKey(QJsonObject *templ); void updatePhoto(QJsonObject *templ); diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/savepage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/savepage.cpp index ba712c9fb..85900d02a 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/savepage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/savepage.cpp @@ -80,6 +80,10 @@ void SavePage::writeToController() enableButtons(true); emit completeChanged(); + + if (m_successfulWrite) { + getWizard()->next(); + } } void SavePage::enableButtons(bool enable) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg b/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg index 236dbe930..eef9bb92b 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg +++ b/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg @@ -30,13 +30,13 @@ inkscape:window-height="928" id="namedview4616" showgrid="false" - inkscape:zoom="1.9844144" - inkscape:cx="236.10597" - inkscape:cy="505.93946" + inkscape:zoom="0.70159644" + inkscape:cx="305.10274" + inkscape:cy="632.28327" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" - inkscape:current-layer="layer12" + inkscape:current-layer="layer17" fit-margin-top="15" fit-margin-left="15" fit-margin-right="15" @@ -18146,7 +18146,7 @@ sodipodi:insensitive="true">