mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 21:05:30 +03:00
Add dynamic lpf and dterm filters
This commit is contained in:
parent
4859878e2f
commit
9f2e608530
5 changed files with 238 additions and 1 deletions
|
@ -969,6 +969,12 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
|||
FILTER_CONFIG.gyro_32khz_hardware_lpf = gyro_32khz_hardware_lpf;
|
||||
} else {
|
||||
FILTER_CONFIG.gyro_32khz_hardware_lpf = 0;
|
||||
|
||||
FILTER_CONFIG.dterm_lowpass2_type = data.readU8();
|
||||
FILTER_CONFIG.gyro_lowpass_dyn_min_hz = data.readU16();
|
||||
FILTER_CONFIG.gyro_lowpass_dyn_max_hz = data.readU16();
|
||||
FILTER_CONFIG.dterm_lowpass_dyn_min_hz = data.readU16();
|
||||
FILTER_CONFIG.dterm_lowpass_dyn_max_hz = data.readU16();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1690,6 +1696,13 @@ MspHelper.prototype.crunch = function(code) {
|
|||
.push8(FILTER_CONFIG.gyro_lowpass2_type)
|
||||
.push16(FILTER_CONFIG.dterm_lowpass2_hz);
|
||||
}
|
||||
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
|
||||
buffer.push8(FILTER_CONFIG.dterm_lowpass2_type)
|
||||
.push16(FILTER_CONFIG.gyro_lowpass_dyn_min_hz)
|
||||
.push16(FILTER_CONFIG.gyro_lowpass_dyn_max_hz)
|
||||
.push16(FILTER_CONFIG.dterm_lowpass_dyn_min_hz)
|
||||
.push16(FILTER_CONFIG.dterm_lowpass_dyn_max_hz);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MSPCodes.MSP_SET_PID_ADVANCED:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue