1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 05:15:25 +03:00

use deep copy for all members

This commit is contained in:
cTn 2014-10-12 16:55:49 +02:00
parent a67bbac54b
commit f30d886f79

View file

@ -52,10 +52,10 @@ function configuration_backup(callback) {
query(); query();
} else { } else {
configuration.profiles.push({ configuration.profiles.push({
'PID': jQuery.merge([], PIDs), 'PID': jQuery.extend(true, [], PIDs),
'RC': jQuery.extend(true, {}, RC_tuning), 'RC': jQuery.extend(true, {}, RC_tuning),
'AccTrim': jQuery.merge([], CONFIG.accelerometerTrims), 'AccTrim': jQuery.extend(true, [], CONFIG.accelerometerTrims),
'ServoConfig': jQuery.merge([], SERVO_CONFIG) 'ServoConfig': jQuery.extend(true, [], SERVO_CONFIG)
}); });
codeKey = 0; codeKey = 0;
@ -83,10 +83,10 @@ function configuration_backup(callback) {
query(); query();
}); });
} else { } else {
configuration.AUX = AUX_CONFIG_values; configuration.AUX = jQuery.extend(true, [], AUX_CONFIG_values);
configuration.MISC = MISC; configuration.MISC = jQuery.extend(true, {}, MISC);
configuration.RCMAP = RC_MAP; configuration.RCMAP = jQuery.extend(true, [], RC_MAP);
configuration.BF_CONFIG = BF_CONFIG; configuration.BF_CONFIG = jQuery.extend(true, {}, BF_CONFIG);
save(); save();
} }