mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 21:05:30 +03:00
Added gyro notch 2 filter.
This commit is contained in:
parent
30857b7490
commit
23d0a8eb5f
5 changed files with 71 additions and 22 deletions
|
@ -591,13 +591,16 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
|||
FILTER_CONFIG.dterm_lpf_hz = data.readU16();
|
||||
FILTER_CONFIG.yaw_lpf_hz = data.readU16();
|
||||
if (semver.gte(CONFIG.apiVersion, "1.20.0")) {
|
||||
FILTER_CONFIG.gyro_soft_notch_hz = data.readU16();
|
||||
FILTER_CONFIG.gyro_soft_notch_cutoff = data.readU16();
|
||||
FILTER_CONFIG.gyro_soft_notch_hz_1 = data.readU16();
|
||||
FILTER_CONFIG.gyro_soft_notch_cutoff_1 = data.readU16();
|
||||
FILTER_CONFIG.dterm_notch_hz = data.readU16();
|
||||
FILTER_CONFIG.dterm_notch_cutoff = data.readU16();
|
||||
if (semver.gte(CONFIG.apiVersion, "1.21.0")) {
|
||||
FILTER_CONFIG.gyro_soft_notch_hz_2 = data.readU16();
|
||||
FILTER_CONFIG.gyro_soft_notch_cutoff_2 = data.readU16();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP_SET_PID_ADVANCED:
|
||||
console.log("Advanced PID settings saved");
|
||||
break;
|
||||
|
@ -1124,10 +1127,14 @@ MspHelper.prototype.crunch = function(code) {
|
|||
.push16(FILTER_CONFIG.dterm_lpf_hz)
|
||||
.push16(FILTER_CONFIG.yaw_lpf_hz);
|
||||
if (semver.gte(CONFIG.apiVersion, "1.20.0")) {
|
||||
buffer.push16(FILTER_CONFIG.gyro_soft_notch_hz)
|
||||
.push16(FILTER_CONFIG.gyro_soft_notch_cutoff)
|
||||
buffer.push16(FILTER_CONFIG.gyro_soft_notch_hz_1)
|
||||
.push16(FILTER_CONFIG.gyro_soft_notch_cutoff_1)
|
||||
.push16(FILTER_CONFIG.dterm_notch_hz)
|
||||
.push16(FILTER_CONFIG.dterm_notch_cutoff);
|
||||
if (semver.gte(CONFIG.apiVersion, "1.21.0")) {
|
||||
buffer.push16(FILTER_CONFIG.gyro_soft_notch_hz_2)
|
||||
.push16(FILTER_CONFIG.gyro_soft_notch_cutoff_2)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MSPCodes.MSP_SET_PID_ADVANCED:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue