Merge remote-tracking branch 'cleanflight/development' into GUI-optimization
commit
5de5f6d191
|
@ -1,4 +1,9 @@
|
|||
<span>2015.10.31 - 1.0.0 - cleanflight</span>
|
||||
<span>2015.11.14 - 1.1.0 - cleanflight</span>
|
||||
<ul>
|
||||
<li>Support Cleanflight API 1.14.0.</li>
|
||||
</ul>
|
||||
|
||||
<span>2015.11.11 - 1.0.0 - cleanflight</span>
|
||||
<ul>
|
||||
<li>Major GUI rework.</li>
|
||||
<li>Support flashing of boards that have USB directly connected to MCU. (Device Firmware Update/DFU support).</li>
|
||||
|
|
|
@ -440,7 +440,7 @@ function configuration_restore(callback) {
|
|||
|
||||
if (semver.lt(migratedVersion, '0.66.0')) {
|
||||
// api 1.12 updated servo configuration protocol and added servo mixer rules
|
||||
for (var profileIndex = 0; i < configuration.profiles.length; i++) {
|
||||
for (var profileIndex = 0; profileIndex < configuration.profiles.length; profileIndex++) {
|
||||
|
||||
if (semver.eq(configuration.apiVersion, '1.10.0')) {
|
||||
// drop two unused servo configurations
|
||||
|
@ -470,6 +470,22 @@ function configuration_restore(callback) {
|
|||
appliedMigrationsCount++;
|
||||
}
|
||||
|
||||
if (semver.lt(configuration.apiVersion, '1.14.0') && semver.gte(CONFIG.apiVersion, "1.14.0")) {
|
||||
// api 1.14 removed old pid controllers
|
||||
for (var profileIndex = 0; profileIndex < configuration.profiles.length; profileIndex++) {
|
||||
var newPidControllerIndex = configuration.profiles[profileIndex].PID.controller;
|
||||
switch (newPidControllerIndex) {
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
newPidControllerIndex = 0;
|
||||
break;
|
||||
}
|
||||
configuration.profiles[profileIndex].PID.controller = newPidControllerIndex;
|
||||
}
|
||||
appliedMigrationsCount++;
|
||||
}
|
||||
|
||||
if (appliedMigrationsCount > 0) {
|
||||
GUI.log(chrome.i18n.getMessage('configMigrationSuccessful', [appliedMigrationsCount]));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"minimum_chrome_version": "38",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"author": "Hydra",
|
||||
"name": "Cleanflight - Configurator",
|
||||
"short_name": "cleanflight",
|
||||
|
|
|
@ -15,12 +15,7 @@
|
|||
</div>
|
||||
<div class="controller">
|
||||
<span class="head" i18n="pidTuningControllerHead"></span> <select name="controller">
|
||||
<option value="0">0 - MultiWii (Old)</option>
|
||||
<option value="1">1 - MultiWii (rewrite)</option>
|
||||
<option value="2">2 - LuxFloat</option>
|
||||
<option value="3">3 - MultiWii (2.3 - latest)</option>
|
||||
<option value="4">4 - MultiWii (2.3 - hybrid)</option>
|
||||
<option value="5">5 - Harakiri</option>
|
||||
<!-- list generated here -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="cf_column fourth">
|
||||
|
|
|
@ -288,6 +288,32 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
pid_and_rc_to_form();
|
||||
|
||||
var pidController_e = $('select[name="controller"]');
|
||||
|
||||
|
||||
var pidControllerList;
|
||||
|
||||
if (semver.lt(CONFIG.apiVersion, "1.14.0")) {
|
||||
pidControllerList = [
|
||||
{ name: "MultiWii (Old)"},
|
||||
{ name: "MultiWii (rewrite)"},
|
||||
{ name: "LuxFloat"},
|
||||
{ name: "MultiWii (2.3 - latest)"},
|
||||
{ name: "MultiWii (2.3 - hybrid)"},
|
||||
{ name: "Harakiri"}
|
||||
]
|
||||
} else {
|
||||
pidControllerList = [
|
||||
{ name: "MultiWii (2.3)"},
|
||||
{ name: "MultiWii (Rewrite)"},
|
||||
{ name: "LuxFloat"},
|
||||
]
|
||||
}
|
||||
|
||||
for (var i = 0; i < pidControllerList.length; i++) {
|
||||
pidController_e.append('<option value="' + (i) + '">' + pidControllerList[i].name + '</option>');
|
||||
}
|
||||
|
||||
|
||||
var profile_e = $('select[name="profile"]');
|
||||
var form_e = $('#pid-tuning');
|
||||
|
||||
|
|
Loading…
Reference in New Issue