1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-17 05:15:21 +03:00

Add dyn notch to UI try2

This commit is contained in:
IvoFPV 2019-08-10 14:48:30 +02:00
parent 7e371ee49e
commit b39f7df5f7
6 changed files with 153 additions and 0 deletions

View file

@ -987,6 +987,12 @@ MspHelper.prototype.process_data = function(dataHandler) {
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();
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
FILTER_CONFIG.dyn_notch_range = data.readU8();
FILTER_CONFIG.dyn_notch_width_percent = data.readU8();
FILTER_CONFIG.dyn_notch_q = data.readU16();
FILTER_CONFIG.dyn_notch_min_hz = data.readU16();
}
}
}
}
@ -1747,6 +1753,12 @@ MspHelper.prototype.crunch = function(code) {
.push16(FILTER_CONFIG.dterm_lowpass_dyn_min_hz)
.push16(FILTER_CONFIG.dterm_lowpass_dyn_max_hz);
}
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
buffer.push8(FILTER_CONFIG.dyn_notch_range)
.push8(FILTER_CONFIG.dyn_notch_width_percent)
.push16(FILTER_CONFIG.dyn_notch_q)
.push16(FILTER_CONFIG.dyn_notch_min_hz);
}
}
break;
case MSPCodes.MSP_SET_PID_ADVANCED: