1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 11:59:51 +03:00

Backend for dterm_setpoint_weight

This commit is contained in:
Pawel Spychalski (DzikuVx) 2017-01-15 13:04:20 +01:00
parent f2be3d8f27
commit fc11eca5c0
2 changed files with 14 additions and 2 deletions

View file

@ -251,7 +251,8 @@ var FC = {
yawItermIgnoreRate: null, yawItermIgnoreRate: null,
yawPLimit: null, yawPLimit: null,
axisAccelerationLimitRollPitch: null, axisAccelerationLimitRollPitch: null,
axisAccelerationLimitYaw: null axisAccelerationLimitYaw: null,
dtermSetpointWeight: null
}; };
INAV_PID_CONFIG = { INAV_PID_CONFIG = {

View file

@ -842,6 +842,11 @@ var mspHelper = (function (gui) {
PID_ADVANCED.rollPitchItermIgnoreRate = data.getUint16(0, true); PID_ADVANCED.rollPitchItermIgnoreRate = data.getUint16(0, true);
PID_ADVANCED.yawItermIgnoreRate = data.getUint16(2, true); PID_ADVANCED.yawItermIgnoreRate = data.getUint16(2, true);
PID_ADVANCED.yawPLimit = data.getUint16(4, true); PID_ADVANCED.yawPLimit = data.getUint16(4, true);
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
PID_ADVANCED.dtermSetpointWeight = data.getUint8(9);
}
PID_ADVANCED.axisAccelerationLimitRollPitch = data.getUint16(13, true); PID_ADVANCED.axisAccelerationLimitRollPitch = data.getUint16(13, true);
PID_ADVANCED.axisAccelerationLimitYaw = data.getUint16(15, true); PID_ADVANCED.axisAccelerationLimitYaw = data.getUint16(15, true);
break; break;
@ -1262,7 +1267,13 @@ var mspHelper = (function (gui) {
buffer.push(0); //BF: currentProfile->pidProfile.deltaMethod buffer.push(0); //BF: currentProfile->pidProfile.deltaMethod
buffer.push(0); //BF: currentProfile->pidProfile.vbatPidCompensation buffer.push(0); //BF: currentProfile->pidProfile.vbatPidCompensation
buffer.push(0); //BF: currentProfile->pidProfile.setpointRelaxRatio buffer.push(0); //BF: currentProfile->pidProfile.setpointRelaxRatio
buffer.push(0); //BF: currentProfile->pidProfile.dtermSetpointWeight
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
buffer.push(PID_ADVANCED.dtermSetpointWeight);
} 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(0); //BF: currentProfile->pidProfile.itermThrottleGain