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">
+ id="revo-satellite">
@@ -18861,7 +18860,7 @@
inkscape:groupmode="layer">
@@ -18960,25 +18959,25 @@
sodipodi:nodetypes="cccc"
style="fill:none;stroke:#1f4697;stroke-width:15.29999924;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
inkscape:connector-curvature="0"
- d="m 1371.2889,1318.8556 0,-124.7594 225,0 0,-141.368"
+ d="M 1371.2889,1318.8556 L 1371.2889,1194.0962 L 1596.2889,1194.0962 L 1596.2889,1052.7282"
id="path8856-5-6" />
+ id="revo-generic-nmea">
@@ -20431,11 +20430,11 @@
+ id="revo-OPGPS-v8-ublox">
+ id="revo-OPGPS-v9">
+ id="flexi-revo-generic-nmea">
@@ -23699,7 +23698,7 @@
+ id="flexi-revo-OPGPS-v8-ublox">
+ id="flexi-revo-OPGPS-v9">
+ points="186.083,4.74 191.036,13.319 186.194,11.031 181.129,13.319 " />
+ points="242.74,485.734 242.74,480.095 251.619,480.095 251.619,473.728 242.74,473.728 242.74,467.777 251.619,467.777 251.619,467.777 251.619,460.783 233.13,460.783 233.13,492.937 251.619,492.937 251.619,485.734 " />
+ points="253.082,454.937 220.283,454.937 220.283,364.946 220.283,364.946 253.082,364.946 " />
+ points="247.754,449.298 247.754,370.688 225.505,370.688 225.505,370.688 225.505,449.298 " />
+ points="242.74,485.734 242.74,480.095 251.619,480.095 251.619,473.728 242.74,473.728 242.74,467.777 251.619,467.777 251.619,467.777 251.619,460.783 233.13,460.783 233.13,492.937 251.619,492.937 251.619,485.734 " />
+ points="220.283,454.937 220.283,364.946 220.283,364.946 253.082,364.946 253.082,454.937 " />
+ points="247.754,370.688 225.505,370.688 225.505,370.688 225.505,449.298 247.754,449.298 " />
+ id="revo-ms4525-speed-sensor">
+ points="251.619,473.728 242.74,473.728 242.74,467.777 251.619,467.777 251.619,467.777 251.619,460.783 233.13,460.783 233.13,492.937 251.619,492.937 251.619,485.734 242.74,485.734 242.74,480.095 251.619,480.095 " />
+ points="253.082,454.937 220.283,454.937 220.283,364.946 220.283,364.946 253.082,364.946 " />
+ points="247.754,449.298 247.754,370.688 225.505,370.688 225.505,370.688 225.505,449.298 " />
+ id="revo-eagletree-speed-sensor">
@@ -28460,7 +28459,7 @@
style="fill:#df181b;fill-opacity:1;stroke:#000000;stroke-width:0.77129602px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ points="233.13,492.937 251.619,492.937 251.619,485.734 242.74,485.734 242.74,480.095 251.619,480.095 251.619,473.728 242.74,473.728 242.74,467.777 251.619,467.777 251.619,467.777 251.619,460.783 233.13,460.783 " />
+ points="220.283,364.946 220.283,364.946 253.082,364.946 253.082,454.937 220.283,454.937 " />
+ points="225.505,370.688 225.505,370.688 225.505,449.298 247.754,449.298 247.754,370.688 " />
getEscType() == VehicleConfigurationSource::ESC_ONESHOT) {
+ if (m_configSource->getEscType() == VehicleConfigurationSource::ESC_ONESHOT ||
+ m_configSource->getEscType() == VehicleConfigurationSource::ESC_RAPID) {
data.CC_RcvrPort = HwSettings::CC_RCVRPORT_PPM_PIN8ONESHOT;
} else {
data.CC_RcvrPort = HwSettings::CC_RCVRPORT_PPMNOONESHOT;
@@ -376,18 +377,19 @@ void VehicleConfigurationHelper::applyActuatorConfiguration()
bankMode = ActuatorSettings::BANKMODE_PWM;
break;
case VehicleConfigurationSource::ESC_RAPID:
- escFrequence = RAPID_ESC_FREQUENCY;
if ((m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_CC ||
m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_CC3D) &&
m_configSource->getInputType() == VehicleConfigurationSource::INPUT_PWM) {
- bankMode = ActuatorSettings::BANKMODE_PWM;
+ bankMode = ActuatorSettings::BANKMODE_PWM;
+ escFrequence = RAPID_ESC_FREQUENCY;
} else {
- bankMode = ActuatorSettings::BANKMODE_PWMSYNC;
+ bankMode = ActuatorSettings::BANKMODE_PWMSYNC;
+ escFrequence = PWMSYNC_ESC_FREQUENCY;
}
break;
case VehicleConfigurationSource::ESC_ONESHOT:
- escFrequence = RAPID_ESC_FREQUENCY;
bankMode = ActuatorSettings::BANKMODE_ONESHOT125;
+ escFrequence = ONESHOT_ESC_FREQUENCY;
break;
default:
break;
diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.h b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.h
index fd2d83d65..002518bf0 100644
--- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.h
+++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.h
@@ -59,6 +59,8 @@ public:
bool setupHardwareSettings(bool save = true);
static const qint16 LEGACY_ESC_FREQUENCY = 50;
static const qint16 RAPID_ESC_FREQUENCY = 490;
+ static const qint16 PWMSYNC_ESC_FREQUENCY = 0;
+ static const qint16 ONESHOT_ESC_FREQUENCY = 0;
static const qint16 ANALOG_SERVO_FREQUENCY = 50;
static const qint16 DIGITAL_SERVO_FREQUENCY = 333;
static const int MIXER_TYPE_NONE = 0;