mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 22:35:17 +03:00
Added selection of dterm lowpass filter type
This commit is contained in:
parent
667c4d5af3
commit
bc86e8bc18
5 changed files with 140 additions and 102 deletions
|
@ -741,19 +741,19 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"portsIdentifier": {
|
"portsIdentifier": {
|
||||||
"message": "Identifier"
|
"message": "Identifier"
|
||||||
},
|
},
|
||||||
"portsConfiguration": {
|
"portsConfiguration": {
|
||||||
"message": "Configuration/MSP"
|
"message": "Configuration/MSP"
|
||||||
},
|
},
|
||||||
"portsSerialRx": {
|
"portsSerialRx": {
|
||||||
"message": "Serial Rx"
|
"message": "Serial Rx"
|
||||||
},
|
},
|
||||||
"portsSensorIn": {
|
"portsSensorIn": {
|
||||||
"message": "Sensor Input"
|
"message": "Sensor Input"
|
||||||
},
|
},
|
||||||
"portsTelemetryOut": {
|
"portsTelemetryOut": {
|
||||||
"message": "Telemetry Output"
|
"message": "Telemetry Output"
|
||||||
},
|
},
|
||||||
"portsPeripherals": {
|
"portsPeripherals": {
|
||||||
"message": "Peripherals"
|
"message": "Peripherals"
|
||||||
|
@ -921,10 +921,10 @@
|
||||||
"message": "Frequency"
|
"message": "Frequency"
|
||||||
},
|
},
|
||||||
"pidTuningRatesCurve": {
|
"pidTuningRatesCurve": {
|
||||||
"message": "Rates"
|
"message": "Rates"
|
||||||
},
|
},
|
||||||
"throttle": {
|
"throttle": {
|
||||||
"message": "Throttle"
|
"message": "Throttle"
|
||||||
},
|
},
|
||||||
"pidTuningButtonSave": {
|
"pidTuningButtonSave": {
|
||||||
"message": "Save"
|
"message": "Save"
|
||||||
|
@ -1239,13 +1239,13 @@
|
||||||
"transponderHelp2": {
|
"transponderHelp2": {
|
||||||
"message": "For more information please visit <a href=\"http://www.arcitimer.com/\" title=\"aRCiTimer\" target=\"_blank\">aRCiTimer site</a>"
|
"message": "For more information please visit <a href=\"http://www.arcitimer.com/\" title=\"aRCiTimer\" target=\"_blank\">aRCiTimer site</a>"
|
||||||
},
|
},
|
||||||
"transponderDataHelp3": {
|
"transponderDataHelp3": {
|
||||||
"message": "Choose ERLT ID 0-63"
|
"message": "Choose ERLT ID 0-63"
|
||||||
},
|
},
|
||||||
"transponderHelp3": {
|
"transponderHelp3": {
|
||||||
"message": "For more information please visit <a href=\"https://github.com/polyvision/EasyRaceLapTimer\" title=\"aRCiTimer\" target=\"_blank\">EasyRaceLapTimer site</a>"
|
"message": "For more information please visit <a href=\"https://github.com/polyvision/EasyRaceLapTimer\" title=\"aRCiTimer\" target=\"_blank\">EasyRaceLapTimer site</a>"
|
||||||
},
|
},
|
||||||
"transponderButtonSave": {
|
"transponderButtonSave": {
|
||||||
"message": "Save"
|
"message": "Save"
|
||||||
},
|
},
|
||||||
"transponderButtonSaveReboot": {
|
"transponderButtonSaveReboot": {
|
||||||
|
@ -1671,73 +1671,73 @@
|
||||||
"message": "VTX (uses vtx frequency to assign color)"
|
"message": "VTX (uses vtx frequency to assign color)"
|
||||||
},
|
},
|
||||||
"ledStripFunctionSection": {
|
"ledStripFunctionSection": {
|
||||||
"message": "LED Functions"
|
"message": "LED Functions"
|
||||||
},
|
},
|
||||||
"ledStripFunctionTitle": {
|
"ledStripFunctionTitle": {
|
||||||
"message": "Function"
|
"message": "Function"
|
||||||
},
|
},
|
||||||
"ledStripColorModifierTitle": {
|
"ledStripColorModifierTitle": {
|
||||||
"message": "Color modifier"
|
"message": "Color modifier"
|
||||||
},
|
},
|
||||||
"ledStripThrottleFunction": {
|
"ledStripThrottleFunction": {
|
||||||
"message": "Throttle"
|
"message": "Throttle"
|
||||||
},
|
},
|
||||||
"ledStripVtxFunction": {
|
"ledStripVtxFunction": {
|
||||||
"message": "Larson scanner"
|
"message": "Larson scanner"
|
||||||
},
|
},
|
||||||
"ledStripBlinkTitle": {
|
"ledStripBlinkTitle": {
|
||||||
"message": "Blink"
|
"message": "Blink"
|
||||||
},
|
},
|
||||||
"ledStripBlinkAlwaysOverlay": {
|
"ledStripBlinkAlwaysOverlay": {
|
||||||
"message": "Blink always"
|
"message": "Blink always"
|
||||||
},
|
},
|
||||||
"ledStripBlinkLandingOverlay": {
|
"ledStripBlinkLandingOverlay": {
|
||||||
"message": "Blink on landing"
|
"message": "Blink on landing"
|
||||||
},
|
},
|
||||||
"ledStripOverlayTitle": {
|
"ledStripOverlayTitle": {
|
||||||
"message": "Overlay"
|
"message": "Overlay"
|
||||||
},
|
},
|
||||||
"ledStripWarningsOverlay": {
|
"ledStripWarningsOverlay": {
|
||||||
"message": "Warnings"
|
"message": "Warnings"
|
||||||
},
|
},
|
||||||
"ledStripIndecatorOverlay": {
|
"ledStripIndecatorOverlay": {
|
||||||
"message": "Indicator (uses position on matrix)"
|
"message": "Indicator (uses position on matrix)"
|
||||||
},
|
},
|
||||||
"ledStripVtxOverlay": {
|
"ledStripVtxOverlay": {
|
||||||
"message": "VTX (uses vtx frequency to assign color)"
|
"message": "VTX (uses vtx frequency to assign color)"
|
||||||
},
|
},
|
||||||
"ledStripFunctionSection": {
|
"ledStripFunctionSection": {
|
||||||
"message": "LED Functions"
|
"message": "LED Functions"
|
||||||
},
|
},
|
||||||
"ledStripFunctionTitle": {
|
"ledStripFunctionTitle": {
|
||||||
"message": "Function"
|
"message": "Function"
|
||||||
},
|
},
|
||||||
"ledStripColorModifierTitle": {
|
"ledStripColorModifierTitle": {
|
||||||
"message": "Color modifier"
|
"message": "Color modifier"
|
||||||
},
|
},
|
||||||
"ledStripThrottleFunction": {
|
"ledStripThrottleFunction": {
|
||||||
"message": "Throttle"
|
"message": "Throttle"
|
||||||
},
|
},
|
||||||
"ledStripVtxFunction": {
|
"ledStripVtxFunction": {
|
||||||
"message": "Larson scanner"
|
"message": "Larson scanner"
|
||||||
},
|
},
|
||||||
"ledStripBlinkTitle": {
|
"ledStripBlinkTitle": {
|
||||||
"message": "Blink"
|
"message": "Blink"
|
||||||
},
|
},
|
||||||
"ledStripBlinkAlwaysOverlay": {
|
"ledStripBlinkAlwaysOverlay": {
|
||||||
"message": "Blink always"
|
"message": "Blink always"
|
||||||
},
|
},
|
||||||
"ledStripBlinkLandingOverlay": {
|
"ledStripBlinkLandingOverlay": {
|
||||||
"message": "Blink on landing"
|
"message": "Blink on landing"
|
||||||
},
|
},
|
||||||
"ledStripOverlayTitle": {
|
"ledStripOverlayTitle": {
|
||||||
"message": "Overlay"
|
"message": "Overlay"
|
||||||
},
|
},
|
||||||
"ledStripWarningsOverlay": {
|
"ledStripWarningsOverlay": {
|
||||||
"message": "Warnings"
|
"message": "Warnings"
|
||||||
},
|
},
|
||||||
"ledStripIndecatorOverlay": {
|
"ledStripIndecatorOverlay": {
|
||||||
"message": "Indicator (uses position on matrix)"
|
"message": "Indicator (uses position on matrix)"
|
||||||
},
|
},
|
||||||
|
|
||||||
"controlAxisRoll": {
|
"controlAxisRoll": {
|
||||||
|
@ -1849,60 +1849,66 @@
|
||||||
"pidTuningLevelHelp": {
|
"pidTuningLevelHelp": {
|
||||||
"message": "The values below change the behaviour of the ANGLE and HORIZON flight modes. Different PID controllers handle the values differently. Please check the documentation."
|
"message": "The values below change the behaviour of the ANGLE and HORIZON flight modes. Different PID controllers handle the values differently. Please check the documentation."
|
||||||
},
|
},
|
||||||
"pidTuningNonProfileFilterSettings": {
|
"pidTuningNonProfileFilterSettings": {
|
||||||
"message": "Profile independent Filter Settings"
|
"message": "Profile independent Filter Settings"
|
||||||
},
|
},
|
||||||
"pidTuningGyroLowpassFrequency": {
|
"pidTuningGyroLowpassFrequency": {
|
||||||
"message": "Gyro Soft Lowpass Frequency [Hz]"
|
"message": "Gyro Soft Lowpass Frequency [Hz]"
|
||||||
},
|
},
|
||||||
"pidTuningGyroLowpassFrequencyHelp": {
|
"pidTuningGyroLowpassFrequencyHelp": {
|
||||||
"message": "Gyro Soft Lowpass Frequency [Hz]"
|
"message": "Gyro Soft Lowpass Frequency [Hz]"
|
||||||
},
|
},
|
||||||
"pidTuningGyroNotch1Frequency": {
|
"pidTuningGyroNotch1Frequency": {
|
||||||
"message": "Gyro Notch Filter 1 Frequency [Hz]"
|
"message": "Gyro Notch Filter 1 Frequency [Hz]"
|
||||||
},
|
},
|
||||||
"pidTuningGyroNotch2Frequency": {
|
"pidTuningGyroNotch2Frequency": {
|
||||||
"message": "Gyro Notch Filter 2 Frequency [Hz]"
|
"message": "Gyro Notch Filter 2 Frequency [Hz]"
|
||||||
},
|
},
|
||||||
"pidTuningGyroNotchFrequencyHelp": {
|
"pidTuningGyroNotchFrequencyHelp": {
|
||||||
"message": "Gyro Notch Filter Frequency in Hz (0 means disabled)"
|
"message": "Gyro Notch Filter Frequency in Hz (0 means disabled)"
|
||||||
},
|
},
|
||||||
"pidTuningGyroNotch1Cutoff": {
|
"pidTuningGyroNotch1Cutoff": {
|
||||||
"message": "Gyro Notch Filter Cutoff 1 Frequency [Hz]"
|
"message": "Gyro Notch Filter Cutoff 1 Frequency [Hz]"
|
||||||
},
|
},
|
||||||
"pidTuningGyroNotch2Cutoff": {
|
"pidTuningGyroNotch2Cutoff": {
|
||||||
"message": "Gyro Notch Filter Cutoff 2 Frequency [Hz]"
|
"message": "Gyro Notch Filter Cutoff 2 Frequency [Hz]"
|
||||||
},
|
},
|
||||||
"pidTuningGyroNotchCutoffHelp": {
|
"pidTuningGyroNotchCutoffHelp": {
|
||||||
"message": "Gyro Notch Filter Cutoff Frequency in Hz (This is where notch filter starts. For example with notch filter 160 and notch hz of 260 it means the range is 160-360hz with most attenuation around center)"
|
"message": "Gyro Notch Filter Cutoff Frequency in Hz (This is where notch filter starts. For example with notch filter 160 and notch hz of 260 it means the range is 160-360hz with most attenuation around center)"
|
||||||
},
|
},
|
||||||
"pidTuningFilterSettings": {
|
"pidTuningFilterSettings": {
|
||||||
"message": "Filter Settings"
|
"message": "Filter Settings"
|
||||||
},
|
},
|
||||||
"pidTuningDTermLowpassFrequency": {
|
"pidTuningDTermLowpassType": {
|
||||||
"message": "D Term Lowpass Frequency [Hz]"
|
"message": "D-Term Lowpass Filter"
|
||||||
},
|
},
|
||||||
"pidTuningDTermLowpassFrequencyHelp": {
|
"pidTuningDTermLowpassTypeTip": {
|
||||||
"message": "D Term Lowpass Frequency [Hz] (0 means disabled)"
|
"message": "Select D-Term lowpass filter type to use. Default is BIQUAD"
|
||||||
},
|
},
|
||||||
"pidTuningDTermNotchFrequency": {
|
"pidTuningDTermLowpassFrequency": {
|
||||||
"message": "D Term Notch Filter Frequency [Hz]"
|
"message": "D Term Lowpass Frequency [Hz]"
|
||||||
},
|
},
|
||||||
"pidTuningDTermNotchFrequencyHelp": {
|
"pidTuningDTermLowpassFrequencyHelp": {
|
||||||
"message": "D Term Notch Filter Frequency [Hz] (0 means disabled)"
|
"message": "D Term Lowpass Frequency [Hz] (0 means disabled)"
|
||||||
},
|
},
|
||||||
"pidTuningDTermNotchCutoff": {
|
"pidTuningDTermNotchFrequency": {
|
||||||
"message": "D Term Notch Filter Cutoff [Hz]"
|
"message": "D Term Notch Filter Frequency [Hz]"
|
||||||
},
|
},
|
||||||
"pidTuningDTermNotchCutoffHelp": {
|
"pidTuningDTermNotchFrequencyHelp": {
|
||||||
"message": "D Term Notch Filter Cutoff in Hz (This is where notch filter starts. For example with notch filter 160 and notch hz of 260 it means the range is 160-360hz with most attenuation around center)"
|
"message": "D Term Notch Filter Frequency [Hz] (0 means disabled)"
|
||||||
},
|
},
|
||||||
"pidTuningYawLowpassFrequency": {
|
"pidTuningDTermNotchCutoff": {
|
||||||
"message": "Yaw Lowpass Frequency [Hz]"
|
"message": "D Term Notch Filter Cutoff [Hz]"
|
||||||
},
|
},
|
||||||
"pidTuningYawLowpassFrequencyHelp": {
|
"pidTuningDTermNotchCutoffHelp": {
|
||||||
"message": "Yaw Lowpass Frequency [Hz] (Yaw axis can sometimes be noiser than the rest. This filter only affects the P of yaw)"
|
"message": "D Term Notch Filter Cutoff in Hz (This is where notch filter starts. For example with notch filter 160 and notch hz of 260 it means the range is 160-360hz with most attenuation around center)"
|
||||||
},
|
},
|
||||||
|
"pidTuningYawLowpassFrequency": {
|
||||||
|
"message": "Yaw Lowpass Frequency [Hz]"
|
||||||
|
},
|
||||||
|
"pidTuningYawLowpassFrequencyHelp": {
|
||||||
|
"message": "Yaw Lowpass Frequency [Hz] (Yaw axis can sometimes be noiser than the rest. This filter only affects the P of yaw)"
|
||||||
|
},
|
||||||
"pidTuningVbatPidCompensation": {
|
"pidTuningVbatPidCompensation": {
|
||||||
"message": "Vbat PID Compensation"
|
"message": "Vbat PID Compensation"
|
||||||
},
|
},
|
||||||
|
@ -2474,22 +2480,22 @@
|
||||||
"message": "FPV Camera Angle [degrees]"
|
"message": "FPV Camera Angle [degrees]"
|
||||||
},
|
},
|
||||||
"onboardLoggingBlackbox": {
|
"onboardLoggingBlackbox": {
|
||||||
"message": "Blackbox logging device"
|
"message": "Blackbox logging device"
|
||||||
},
|
},
|
||||||
"onboardLoggingRateOfLogging": {
|
"onboardLoggingRateOfLogging": {
|
||||||
"message": "Blackbox logging rate"
|
"message": "Blackbox logging rate"
|
||||||
},
|
},
|
||||||
"onboardLoggingSerialLogger": {
|
"onboardLoggingSerialLogger": {
|
||||||
"message": "Outboard serial logging device"
|
"message": "Outboard serial logging device"
|
||||||
},
|
},
|
||||||
"onboardLoggingFlashLogger": {
|
"onboardLoggingFlashLogger": {
|
||||||
"message": "Onboard dataflash chip"
|
"message": "Onboard dataflash chip"
|
||||||
},
|
},
|
||||||
"onboardLoggingEraseInProgress": {
|
"onboardLoggingEraseInProgress": {
|
||||||
"message": "Erase in progress, please wait..."
|
"message": "Erase in progress, please wait..."
|
||||||
},
|
},
|
||||||
"onboardLoggingOnboardSDCard": {
|
"onboardLoggingOnboardSDCard": {
|
||||||
"message": "Onboard SD card"
|
"message": "Onboard SD card"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
1
js/fc.js
1
js/fc.js
|
@ -313,6 +313,7 @@ var FC = {
|
||||||
dterm_notch_cutoff: 0,
|
dterm_notch_cutoff: 0,
|
||||||
gyro_soft_notch_hz_2: 0,
|
gyro_soft_notch_hz_2: 0,
|
||||||
gyro_soft_notch_cutoff_2: 0,
|
gyro_soft_notch_cutoff_2: 0,
|
||||||
|
dterm_filter_type: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
ADVANCED_TUNING = {
|
ADVANCED_TUNING = {
|
||||||
|
|
|
@ -788,6 +788,9 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
||||||
FILTER_CONFIG.gyro_soft_notch_hz_2 = data.readU16();
|
FILTER_CONFIG.gyro_soft_notch_hz_2 = data.readU16();
|
||||||
FILTER_CONFIG.gyro_soft_notch_cutoff_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;
|
break;
|
||||||
case MSPCodes.MSP_SET_PID_ADVANCED:
|
case MSPCodes.MSP_SET_PID_ADVANCED:
|
||||||
|
@ -1388,6 +1391,9 @@ MspHelper.prototype.crunch = function(code) {
|
||||||
buffer.push16(FILTER_CONFIG.gyro_soft_notch_hz_2)
|
buffer.push16(FILTER_CONFIG.gyro_soft_notch_hz_2)
|
||||||
.push16(FILTER_CONFIG.gyro_soft_notch_cutoff_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;
|
break;
|
||||||
case MSPCodes.MSP_SET_PID_ADVANCED:
|
case MSPCodes.MSP_SET_PID_ADVANCED:
|
||||||
|
|
|
@ -434,6 +434,21 @@
|
||||||
<p i18n="tuningHelp"></p>
|
<p i18n="tuningHelp"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="dtermfiltertype cf_column twothird">
|
||||||
|
<div class="profile single-field" style="width:200px; margin-bottom: 0px;">
|
||||||
|
<div class="helpicon cf_tip" i18n_title="pidTuningDTermLowpassTypeTip" style="margin-top: 5px;"></div>
|
||||||
|
<div class="head" i18n="pidTuningDTermLowpassType"></div>
|
||||||
|
<div class="bottomarea">
|
||||||
|
<select name="dtermFilterType">
|
||||||
|
<option value="0" class="PT1">PT1</option>
|
||||||
|
<option value="1" class="BIQUAD">BIQUAD</option>
|
||||||
|
<option value="2" class="FIR">FIR</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="cf_column twothird">
|
<div class="cf_column twothird">
|
||||||
<div class="gui_box grey topspacer pid_filter">
|
<div class="gui_box grey topspacer pid_filter">
|
||||||
<table class="pid_titlebar new_rates">
|
<table class="pid_titlebar new_rates">
|
||||||
|
|
|
@ -258,6 +258,12 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
} else {
|
} else {
|
||||||
$('.pid_sensitivity').hide();
|
$('.pid_sensitivity').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
|
||||||
|
$('.profile select[name="dtermFilterType"]').val(FILTER_CONFIG.dterm_filter_type);
|
||||||
|
} else {
|
||||||
|
$('.dtermfiltertype').hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function form_to_pid_and_rc() {
|
function form_to_pid_and_rc() {
|
||||||
|
@ -368,6 +374,10 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
ADVANCED_TUNING.levelAngleLimit = parseInt($('.pid_tuning input[name="angleLimit"]').val());
|
ADVANCED_TUNING.levelAngleLimit = parseInt($('.pid_tuning input[name="angleLimit"]').val());
|
||||||
ADVANCED_TUNING.levelSensitivity = parseInt($('.pid_tuning input[name="sensitivity"]').val());
|
ADVANCED_TUNING.levelSensitivity = parseInt($('.pid_tuning input[name="sensitivity"]').val());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
|
||||||
|
FILTER_CONFIG.dterm_filter_type = $('.profile select[name="dtermFilterType"]').val();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showAllPids() {
|
function showAllPids() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue