mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-17 21:35:33 +03:00
Merge pull request #545 from basdelfos/bfc_change_dterm_filter
Added new features and settings for BF 3.2
This commit is contained in:
commit
fc371852b2
6 changed files with 200 additions and 108 deletions
|
@ -789,6 +789,9 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
|||
FILTER_CONFIG.gyro_soft_notch_hz_2 = data.readU16();
|
||||
FILTER_CONFIG.gyro_soft_notch_cutoff_2 = data.readU16();
|
||||
}
|
||||
if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
|
||||
FILTER_CONFIG.dterm_filter_type = data.readU8();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MSPCodes.MSP_SET_PID_ADVANCED:
|
||||
|
@ -808,10 +811,14 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
|||
ADVANCED_TUNING.itermThrottleGain = data.readU8();
|
||||
ADVANCED_TUNING.pidMaxVelocity = data.readU16();
|
||||
ADVANCED_TUNING.pidMaxVelocityYaw = data.readU16();
|
||||
}
|
||||
if (semver.gte(CONFIG.apiVersion, "1.24.0")) {
|
||||
ADVANCED_TUNING.levelAngleLimit = data.readU8();
|
||||
ADVANCED_TUNING.levelSensitivity = data.readU8();
|
||||
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();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MSPCodes.MSP_SENSOR_CONFIG:
|
||||
|
@ -1392,6 +1399,9 @@ MspHelper.prototype.crunch = function(code) {
|
|||
buffer.push16(FILTER_CONFIG.gyro_soft_notch_hz_2)
|
||||
.push16(FILTER_CONFIG.gyro_soft_notch_cutoff_2)
|
||||
}
|
||||
if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
|
||||
buffer.push8(FILTER_CONFIG.dterm_filter_type);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MSPCodes.MSP_SET_PID_ADVANCED:
|
||||
|
@ -1412,6 +1422,10 @@ MspHelper.prototype.crunch = function(code) {
|
|||
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);
|
||||
}
|
||||
}
|
||||
// only supports 1 version pre bf 3.0
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue