1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 00:05:22 +03:00

Remove legacy servo configuration which originated from the overloaded

use of the servo 'rate'.  All servos are free to be configured
regardless of whether the mixer actually uses those servos.
This commit is contained in:
Dominic Clifton 2015-07-13 02:01:19 +01:00
parent 1cb64130cc
commit 687c0f1a84
7 changed files with 76 additions and 224 deletions

View file

@ -448,13 +448,20 @@ function configuration_restore(callback) {
configuration.profiles[profileIndex].ServoConfig.pop();
}
}
for (var i = 0; i < configuration.profiles[profileIndex].ServoConfig.length; i++) {
var servoConfig = profiles[profileIndex].ServoConfig;
servoConfig[i].angleAtMin = 90;
servoConfig[i].angleAtMax = 90;
servoConfig[i].reversedInputSources = 0;
// set the rate to 0 if an invalid value is detected.
if (servoConfig[i].rate < -100 || servoConfig[i].rate > 100) {
servoConfig[i].rate = 0;
}
}
configuration.profiles[profileIndex].ServoRules = [];
}