mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-17 05:15:21 +03:00
Add new PID elements for version 3.5
- iterm rotation - smart feedforward - iterm relax - absolute control - acro trainer
This commit is contained in:
parent
25b49fb79f
commit
b543ebf3ef
6 changed files with 321 additions and 16 deletions
|
@ -871,13 +871,25 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
|||
if (semver.gte(CONFIG.apiVersion, "1.24.0")) {
|
||||
ADVANCED_TUNING.levelAngleLimit = data.readU8();
|
||||
ADVANCED_TUNING.levelSensitivity = data.readU8();
|
||||
}
|
||||
if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
|
||||
ADVANCED_TUNING.itermThrottleThreshold = data.readU16();
|
||||
ADVANCED_TUNING.itermAcceleratorGain = data.readU16();
|
||||
}
|
||||
if (semver.gte(CONFIG.apiVersion, "1.39.0")) {
|
||||
ADVANCED_TUNING.dtermSetpointWeight = data.readU16();
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
|
||||
ADVANCED_TUNING.itermThrottleThreshold = data.readU16();
|
||||
ADVANCED_TUNING.itermAcceleratorGain = data.readU16();
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.39.0")) {
|
||||
ADVANCED_TUNING.dtermSetpointWeight = data.readU16();
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.40.0")) {
|
||||
ADVANCED_TUNING.itermRotation = data.readU8();
|
||||
ADVANCED_TUNING.smartFeedforward = data.readU8();
|
||||
ADVANCED_TUNING.itermRelax = data.readU8();
|
||||
ADVANCED_TUNING.itermRelaxType = data.readU8();
|
||||
ADVANCED_TUNING.absoluteControlGain = data.readU8();
|
||||
ADVANCED_TUNING.throttleBoost = data.readU8();
|
||||
ADVANCED_TUNING.acroTrainerAngleLimit = data.readU8();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1515,16 +1527,30 @@ MspHelper.prototype.crunch = function(code) {
|
|||
.push8(ADVANCED_TUNING.itermThrottleGain)
|
||||
.push16(ADVANCED_TUNING.pidMaxVelocity)
|
||||
.push16(ADVANCED_TUNING.pidMaxVelocityYaw);
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.24.0")) {
|
||||
buffer.push8(ADVANCED_TUNING.levelAngleLimit)
|
||||
.push8(ADVANCED_TUNING.levelSensitivity);
|
||||
}
|
||||
if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
|
||||
buffer.push16(ADVANCED_TUNING.itermThrottleThreshold)
|
||||
.push16(ADVANCED_TUNING.itermAcceleratorGain);
|
||||
}
|
||||
if (semver.gte(CONFIG.apiVersion, "1.39.0")) {
|
||||
buffer.push16(ADVANCED_TUNING.dtermSetpointWeight);
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
|
||||
buffer.push16(ADVANCED_TUNING.itermThrottleThreshold)
|
||||
.push16(ADVANCED_TUNING.itermAcceleratorGain);
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.39.0")) {
|
||||
buffer.push16(ADVANCED_TUNING.dtermSetpointWeight);
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.40.0")) {
|
||||
buffer.push8(ADVANCED_TUNING.itermRotation)
|
||||
.push8(ADVANCED_TUNING.smartFeedforward)
|
||||
.push8(ADVANCED_TUNING.itermRelax)
|
||||
.push8(ADVANCED_TUNING.itermRelaxType)
|
||||
.push8(ADVANCED_TUNING.absoluteControlGain)
|
||||
.push8(ADVANCED_TUNING.throttleBoost)
|
||||
.push8(ADVANCED_TUNING.acroTrainerAngleLimit);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// only supports 1 version pre bf 3.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue