1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-15 12:25:13 +03:00

Messed up some brackets

This commit is contained in:
NightHawk32 2015-12-15 16:00:01 -05:00
parent a72a00a2de
commit da1f456b87

View file

@ -225,8 +225,9 @@ function configuration_backup(callback) {
}); });
}); });
} }
}
}
function configuration_restore(callback) { function configuration_restore(callback) {
var chosenFileEntry = null; var chosenFileEntry = null;
@ -306,6 +307,7 @@ function configuration_restore(callback) {
} }
return semver.gte(generated, required); return semver.gte(generated, required);
} }
function migrate(configuration) { function migrate(configuration) {
var appliedMigrationsCount = 0; var appliedMigrationsCount = 0;
@ -531,8 +533,8 @@ function configuration_restore(callback) {
for (var profileIndex = 0; profileIndex < configuration.profiles.length; profileIndex++) { for (var profileIndex = 0; profileIndex < configuration.profiles.length; profileIndex++) {
if (configuration.profile[profileIndex].RCcontrols == undefined) { if (configuration.profiles[profileIndex].RCcontrols == undefined) {
configuration.profile[profileIndex].RCcontrols = { configuration.profiles[profileIndex].RCcontrols = {
deadband: 0, deadband: 0,
yaw_deadband: 0, yaw_deadband: 0,
alt_hold_deadband: 40, alt_hold_deadband: 40,
@ -547,8 +549,6 @@ function configuration_restore(callback) {
align_mag: 0 align_mag: 0
}; };
} }
appliedMigrationsCount++;
}
// api 1.15 exposes RX_CONFIG, FAILSAFE_CONFIG and RXFAIL_CONFIG configuration // api 1.15 exposes RX_CONFIG, FAILSAFE_CONFIG and RXFAIL_CONFIG configuration
@ -597,8 +597,7 @@ function configuration_restore(callback) {
if (appliedMigrationsCount > 0) { if (appliedMigrationsCount > 0) {
GUI.log(chrome.i18n.getMessage('configMigrationSuccessful', [appliedMigrationsCount])); GUI.log(chrome.i18n.getMessage('configMigrationSuccessful', [appliedMigrationsCount]));
} }
return true; return true;
} }
@ -783,4 +782,4 @@ function configuration_restore(callback) {
upload(); upload();
} }
}