Merge remote-tracking branch 'cleanflight/development' into GUI-optimization

10.3.x-maintenance
skaman82 2015-11-14 01:49:10 +01:00
commit 5de5f6d191
5 changed files with 51 additions and 9 deletions

View File

@ -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> <ul>
<li>Major GUI rework.</li> <li>Major GUI rework.</li>
<li>Support flashing of boards that have USB directly connected to MCU. (Device Firmware Update/DFU support).</li> <li>Support flashing of boards that have USB directly connected to MCU. (Device Firmware Update/DFU support).</li>

View File

@ -440,7 +440,7 @@ function configuration_restore(callback) {
if (semver.lt(migratedVersion, '0.66.0')) { if (semver.lt(migratedVersion, '0.66.0')) {
// api 1.12 updated servo configuration protocol and added servo mixer rules // 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')) { if (semver.eq(configuration.apiVersion, '1.10.0')) {
// drop two unused servo configurations // drop two unused servo configurations
@ -470,6 +470,22 @@ function configuration_restore(callback) {
appliedMigrationsCount++; 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) { if (appliedMigrationsCount > 0) {
GUI.log(chrome.i18n.getMessage('configMigrationSuccessful', [appliedMigrationsCount])); GUI.log(chrome.i18n.getMessage('configMigrationSuccessful', [appliedMigrationsCount]));
} }

View File

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"minimum_chrome_version": "38", "minimum_chrome_version": "38",
"version": "1.0.0", "version": "1.1.0",
"author": "Hydra", "author": "Hydra",
"name": "Cleanflight - Configurator", "name": "Cleanflight - Configurator",
"short_name": "cleanflight", "short_name": "cleanflight",

View File

@ -15,12 +15,7 @@
</div> </div>
<div class="controller"> <div class="controller">
<span class="head" i18n="pidTuningControllerHead"></span> <select name="controller"> <span class="head" i18n="pidTuningControllerHead"></span> <select name="controller">
<option value="0">0 - MultiWii (Old)</option> <!-- list generated here -->
<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>
</select> </select>
</div> </div>
<div class="cf_column fourth"> <div class="cf_column fourth">

View File

@ -288,6 +288,32 @@ TABS.pid_tuning.initialize = function (callback) {
pid_and_rc_to_form(); pid_and_rc_to_form();
var pidController_e = $('select[name="controller"]'); 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 profile_e = $('select[name="profile"]');
var form_e = $('#pid-tuning'); var form_e = $('#pid-tuning');