From 2f4dcc9a372f123580c487f1461f22bbf137e5e7 Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Fri, 20 Jan 2017 10:58:41 +0100 Subject: [PATCH] backend of pidSumLimit --- js/fc.js | 3 ++- js/msp/MSPHelper.js | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/js/fc.js b/js/fc.js index 15a93457..e34e75be 100644 --- a/js/fc.js +++ b/js/fc.js @@ -252,7 +252,8 @@ var FC = { yawPLimit: null, axisAccelerationLimitRollPitch: null, axisAccelerationLimitYaw: null, - dtermSetpointWeight: null + dtermSetpointWeight: null, + pidSumLimit: null }; INAV_PID_CONFIG = { diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index ab64c25e..3ef295ae 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -846,6 +846,7 @@ var mspHelper = (function (gui) { if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) { PID_ADVANCED.dtermSetpointWeight = data.getUint8(9); + PID_ADVANCED.pidSumLimit = data.getUint16(10, true); } PID_ADVANCED.axisAccelerationLimitRollPitch = data.getUint16(13, true); @@ -1262,12 +1263,14 @@ var mspHelper = (function (gui) { if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) { buffer.push(PID_ADVANCED.dtermSetpointWeight); + buffer.push(lowByte(PID_ADVANCED.pidSumLimit)); + buffer.push(highByte(PID_ADVANCED.pidSumLimit)); } else { buffer.push(0); + buffer.push(0); // reserved + buffer.push(0); // reserved } - buffer.push(0); // reserved - buffer.push(0); // reserved buffer.push(0); //BF: currentProfile->pidProfile.itermThrottleGain buffer.push(lowByte(PID_ADVANCED.axisAccelerationLimitRollPitch));