mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-21 15:25:22 +03:00
Merge pull request #1869 from Asizon/DynamicNotchMaxHz
Coordination with new Dynamic Notch improvements
This commit is contained in:
commit
abb3429b96
5 changed files with 39 additions and 2 deletions
|
@ -416,6 +416,7 @@ var FC = {
|
|||
dyn_notch_width_percent: 0,
|
||||
dyn_notch_q: 0,
|
||||
dyn_notch_min_hz: 0,
|
||||
dyn_notch_max_hz: 0,
|
||||
gyro_rpm_notch_harmonics: 0,
|
||||
gyro_rpm_notch_min_hz: 0,
|
||||
};
|
||||
|
|
|
@ -1078,6 +1078,9 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
|||
FILTER_CONFIG.gyro_rpm_notch_harmonics = data.readU8();
|
||||
FILTER_CONFIG.gyro_rpm_notch_min_hz = data.readU8();
|
||||
}
|
||||
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
|
||||
FILTER_CONFIG.dyn_notch_max_hz = data.readU16();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2007,6 +2010,9 @@ MspHelper.prototype.crunch = function(code) {
|
|||
.push8(FILTER_CONFIG.gyro_rpm_notch_harmonics)
|
||||
.push8(FILTER_CONFIG.gyro_rpm_notch_min_hz);
|
||||
}
|
||||
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
|
||||
buffer.push16(FILTER_CONFIG.dyn_notch_max_hz);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MSPCodes.MSP_SET_PID_ADVANCED:
|
||||
|
|
|
@ -349,10 +349,17 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
} else {
|
||||
$('.dynamicNotch').hide();
|
||||
}
|
||||
$('.dynamicNotchRange').toggle(semver.lt(CONFIG.apiVersion, "1.43.0"));
|
||||
$('.pid_filter select[name="dynamicNotchRange"]').val(FILTER_CONFIG.dyn_notch_range);
|
||||
$('.pid_filter input[name="dynamicNotchWidthPercent"]').val(FILTER_CONFIG.dyn_notch_width_percent);
|
||||
$('.pid_filter input[name="dynamicNotchQ"]').val(FILTER_CONFIG.dyn_notch_q);
|
||||
$('.pid_filter input[name="dynamicNotchMinHz"]').val(FILTER_CONFIG.dyn_notch_min_hz);
|
||||
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
|
||||
$('.pid_filter input[name="dynamicNotchMinHz"]').attr("max","250");
|
||||
$('.pid_filter input[name="dynamicNotchMaxHz"]').val(FILTER_CONFIG.dyn_notch_max_hz);
|
||||
} else {
|
||||
$('.dynamicNotchMaxHz').hide();
|
||||
}
|
||||
|
||||
$('.rpmFilter').toggle(MOTOR_CONFIG.use_dshot_telemetry);
|
||||
|
||||
|
@ -753,6 +760,10 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
FILTER_CONFIG.gyro_rpm_notch_harmonics = rpmFilterEnabled ? parseInt($('.pid_filter input[name="rpmFilterHarmonics"]').val()) : 0;
|
||||
FILTER_CONFIG.gyro_rpm_notch_min_hz = parseInt($('.pid_filter input[name="rpmFilterMinHz"]').val());
|
||||
}
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
|
||||
FILTER_CONFIG.dyn_notch_max_hz = parseInt($('.pid_filter input[name="dynamicNotchMaxHz"]').val());
|
||||
}
|
||||
}
|
||||
|
||||
function showAllPids() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue