Merge pull request #157 from mikeller/fix_controller
Fixed PID controller selection.10.3.x-maintenance
commit
9467a3c0eb
|
@ -687,15 +687,16 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
$('a.update').click(function () {
|
||||
form_to_pid_and_rc();
|
||||
|
||||
Promise.resolve(function () {
|
||||
var promise;
|
||||
if (semver.gte(CONFIG.apiVersion, CONFIGURATOR.pidControllerChangeMinApiVersion)) {
|
||||
PID.controller = pidController_e.val();
|
||||
promise = MSP.promise(MSP_codes.MSP_SET_PID_CONTROLLER, MSP.crunch(MSP_codes.MSP_SET_PID_CONTROLLER));
|
||||
} else {
|
||||
promise = new Promise(function (resolve) {
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
return promise;
|
||||
}).then(function () {
|
||||
promise.then(function () {
|
||||
return MSP.promise(MSP_codes.MSP_SET_PID, MSP.crunch(MSP_codes.MSP_SET_PID));
|
||||
}).then(function () {
|
||||
return MSP.promise(MSP_codes.MSP_SET_PID_ADVANCED, MSP.crunch(MSP_codes.MSP_SET_PID_ADVANCED));
|
||||
|
|
Loading…
Reference in New Issue