1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-23 08:15:19 +03:00

Merge pull request #917 from iNavFlight/dzikuvx-pid-tuning-filter-catchup

PID Tuning tab catchup
This commit is contained in:
Paweł Spychalski 2020-02-21 10:41:55 +01:00 committed by GitHub
commit ab5e88fe6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 120 additions and 113 deletions

View file

@ -3167,11 +3167,47 @@
"gyro_lpf_type_help": {
"message": "BIQUAD offers better noise attenuation for a price of higher delay. PT1 has lower attenuation but offers lower delay."
},
"gyro_stage2_lowpass_type": {
"message": "Gyro Stage 2 LPF type"
},
"gyro_stage2_lowpass_type_help": {
"message": "BIQUAD offers better noise attenuation for a price of higher delay. PT1 has lower attenuation but offers lower delay."
},
"dterm_lpf_type": {
"message": "D-term LPF type"
},
"dterm_lpf_type_help": {
"message": "BIQUAD offers better noise attenuation for a price of higher delay. PT1 has lower attenuation but offers lower delay."
},
"dterm_lpf2_type": {
"message": "D-term Stage 2 LPF type"
},
"dterm_lpf2_type_help": {
"message": "BIQUAD offers better noise attenuation for a price of higher delay. PT1 has lower attenuation but offers lower delay."
},
"dterm_lpf2_hz": {
"message": "D-term Stage 2 LPF cutoff frequency"
},
"dterm_lpf2_hz_help": {
"message": "Lowpass cutoff filter for D-term on ROLL and PITCH axises. 0 mean filter is disabled"
},
"tabFilteringAdvanced": {
"message": "Other filters"
},
"mainFilters": {
"message": "Main filters"
"message": "Gyro filters"
},
"rpmFilters": {
"message": "Gyro RPM filters"
},
"dtermFilters": {
"message": "D-term filters"
},
"rpm_gyro_filter_enabled": {
"message": "Gyro RPM filter (requires ESC telemetry)"
},
"rpm_gyro_min_hz": {
"message": "Gyro RPM filter min. frequency"
},
"acc_lpf_type": {
"message": "Accelerometer LPF type"

View file

@ -2,8 +2,8 @@
var CONFIGURATOR = {
// all versions are specified and compared using semantic versioning http://semver.org/
'minfirmwareVersionAccepted': '2.3.0',
'maxFirmwareVersionAccepted': '2.5.0', // COndition is < (lt) so we accept all in 2.2 branch, not 2.3 actualy
'minfirmwareVersionAccepted': '2.4.0',
'maxFirmwareVersionAccepted': '2.6.0', // COndition is < (lt) so we accept all in 2.2 branch, not 2.3 actualy
'connectionValid': false,
'connectionValidCliOnly': false,
'cliActive': false,

View file

@ -276,7 +276,7 @@
<div class="cf_column">
<table class="rate-tpa rate-tpa--filtering">
<tbody>
<tr class="requires-v2_3">
<tr>
<th>Gyro Dynamic Notch Filter</th>
<td>
<div style="padding-left: 1em; line-height: 28px;">
@ -284,21 +284,21 @@
</div>
</td>
</tr>
<tr class="requires-v2_3">
<tr>
<th>Gyro Dynamic Notch Width</th>
<td>
<input data-setting="dyn_notch_width_percent" type="number" class="rate-tpa_input" />
<div class="helpicon cf_tip" title="Sets the distance in percent between dynamic gyro notches. Set to 0 to use single dynamic gyro notch."></div>
</td>
</tr>
<tr class="requires-v2_3">
<tr>
<th>Gyro Dynamic Notch Min Frequency</th>
<td>
<input data-setting="dyn_notch_min_hz" type="number" class="rate-tpa_input" />
<div class="helpicon cf_tip" title="Minimum frequency for dynamic gyro notch filters. Value should depends on propeller size. 150Hz work fine with 5&quot; and smaller. For 7&quot; and above lower even below 100Hz."></div>
</td>
</tr>
<tr class="requires-v2_2">
<tr>
<th data-i18n="gyro_lpf_type"></th>
<td>
<select data-setting="gyro_lpf_type" />
@ -313,6 +313,13 @@
<div class="helpicon cf_tip" data-i18n_title="gyroLpfCutoffFrequencyHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="gyro_stage2_lowpass_type"></th>
<td>
<select data-setting="gyro_stage2_lowpass_type" />
<div class="helpicon cf_tip" data-i18n_title="gyro_stage2_lowpass_type_help"></div>
</td>
</tr>
<tr>
<th data-i18n="gyroStage2LpfCutoffFrequency"></th>
<td>
@ -322,6 +329,23 @@
<div class="helpicon cf_tip" data-i18n_title="gyroStage2LpfCutoffFrequencyHelp"></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="clear-both"></div>
<div class="tab_subtitle" data-i18n="dtermFilters" style="margin-top: 1em;"></div>
<div class="cf_column">
<table class="rate-tpa rate-tpa--filtering">
<tbody>
<tr>
<th data-i18n="dterm_lpf_type"></th>
<td>
<select data-setting="dterm_lpf_type" />
<div class="helpicon cf_tip" data-i18n_title="dterm_lpf_type_help"></div>
</td>
</tr>
<tr>
<th data-i18n="dtermLpfCutoffFrequency"></th>
<td>
@ -330,6 +354,41 @@
<div class="helpicon cf_tip" data-i18n_title="dtermLpfCutoffFrequencyHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="dterm_lpf2_type"></th>
<td>
<select data-setting="dterm_lpf2_type" />
<div class="helpicon cf_tip" data-i18n_title="dterm_lpf2_type_help"></div>
</td>
</tr>
<tr>
<th data-i18n="dterm_lpf2_hz"></th>
<td>
<input data-setting="dterm_lpf2_hz" type="number" class="rate-tpa_input" />
<div class="helpicon cf_tip" data-i18n_title="dterm_lpf2_hz_help"></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="clear-both requires-v2_4"></div>
<div class="tab_subtitle requires-v2_4" data-i18n="rpmFilters" style="margin-top: 1em;"></div>
<div class="cf_column requires-v2_4">
<table class="rate-tpa rate-tpa--filtering">
<tbody>
<tr>
<th data-i18n="rpm_gyro_filter_enabled"></th>
<td>
<select data-setting="rpm_gyro_filter_enabled" />
</td>
</tr>
<tr>
<th data-i18n="rpm_gyro_min_hz"></th>
<td>
<input data-setting="rpm_gyro_min_hz" type="number" class="rate-tpa_input" />
</td>
</tr>
</tbody>
</table>
</div>
@ -347,7 +406,7 @@
<div class="helpicon cf_tip" data-i18n_title="accLpfCutoffFrequencyHelp"></div>
</td>
</tr>
<tr class="requires-v2_2">
<tr>
<th data-i18n="acc_lpf_type"></th>
<td>
<select data-setting="acc_lpf_type" />
@ -366,78 +425,6 @@
</tbody>
</table>
</div>
<div class="clear-both"></div>
<div class="tab_subtitle" style="margin-top: 1em;">Static Notch Filters (deprecated)</div>
<div class="cf_column">
<table class="rate-tpa rate-tpa--filtering">
<tbody>
<tr>
<th data-i18n="accNotchHz"></th>
<td>
<input type="number" data-simple-bind="FILTER_CONFIG.accNotchHz" id="accNotchHz"
class="rate-tpa_input" step="1" min="0" max="255" /> Hz
<div class="helpicon cf_tip" data-i18n_title="accNotchHzHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="accNotchCutoff"></th>
<td>
<input type="number" data-simple-bind="FILTER_CONFIG.accNotchCutoff"
id="gyroNotchCutoff2" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
<div class="helpicon cf_tip" data-i18n_title="accNotchCutoffHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="gyroNotchHz1"></th>
<td>
<input type="number" data-simple-bind="FILTER_CONFIG.gyroNotchHz1" id="gyroNotchHz1"
class="rate-tpa_input" step="1" min="0" max="500" /> Hz
<div class="helpicon cf_tip" data-i18n_title="gyroNotchHz1Help"></div>
</td>
</tr>
<tr>
<th data-i18n="gyroNotchCutoff1"></th>
<td>
<input type="number" data-simple-bind="FILTER_CONFIG.gyroNotchCutoff1"
id="gyroNotchCutoff1" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
<div class="helpicon cf_tip" data-i18n_title="gyroNotchCutoff1Help"></div>
</td>
</tr>
<tr>
<th data-i18n="gyroNotchHz2"></th>
<td>
<input type="number" data-simple-bind="FILTER_CONFIG.gyroNotchHz2" id="gyroNotchHz2"
class="rate-tpa_input" step="1" min="0" max="500" /> Hz
<div class="helpicon cf_tip" data-i18n_title="gyroNotchHz2Help"></div>
</td>
</tr>
<tr>
<th data-i18n="gyroNotchCutoff2"></th>
<td>
<input type="number" data-simple-bind="FILTER_CONFIG.gyroNotchCutoff2"
id="gyroNotchCutoff2" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
<div class="helpicon cf_tip" data-i18n_title="gyroNotchCutoff2Help"></div>
</td>
</tr>
<tr>
<th data-i18n="dtermNotchHz"></th>
<td>
<input type="number" data-simple-bind="FILTER_CONFIG.dtermNotchHz" id="dtermNotchHz"
class="rate-tpa_input" step="1" min="0" max="500" /> Hz
<div class="helpicon cf_tip" data-i18n_title="dtermNotchHzHelp"></div>
</td>
</tr>
<tr>
<th data-i18n="dtermNotchCutoff"></th>
<td>
<input type="number" data-simple-bind="FILTER_CONFIG.dtermNotchCutoff"
id="dtermNotchCutoff" class="rate-tpa_input" step="1" min="0" max="500" /> Hz
<div class="helpicon cf_tip" data-i18n_title="dtermNotchCutoffHelp"></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="subtab-mechanics" class="subtab__content">
@ -446,54 +433,54 @@
<div class="cf_column">
<table class="rate-tpa rate-tpa--filtering">
<tbody>
<tr class="requires-v2_2">
<tr>
<th data-i18n="mc_airmode_type"></th>
<td>
<select data-setting="mc_airmode_type" />
<div class="helpicon cf_tip" data-i18n_title="mc_airmode_type_help"></div>
</td>
</tr>
<tr class="requires-v2_2">
<tr>
<th data-i18n="mc_airmode_threshold"></th>
<td>
<select data-setting="mc_airmode_threshold" />
<div class="helpicon cf_tip" data-i18n_title="mc_airmode_threshold_help"></div>
</td>
</tr>
<tr class="requires-v2_2">
<tr>
<th data-i18n="itermRelax"></th>
<td>
<select data-setting="mc_iterm_relax" />
<div class="helpicon cf_tip" data-i18n_title="itermRelaxHelp"></div>
</td>
</tr>
<tr class="requires-v2_2">
<tr>
<th data-i18n="itermRelaxCutoff"></th>
<td>
<input data-setting="mc_iterm_relax_cutoff" class="rate-tpa_input" />
<div class="helpicon cf_tip" data-i18n_title="itermRelaxCutoffHelp"></div>
</td>
</tr>
<tr class="requires-v2_2">
<tr>
<th data-i18n="itermRelaxType"></th>
<td>
<select data-setting="mc_iterm_relax_type" />
<div class="helpicon cf_tip" data-i18n_title="itermRelaxTypeHelp"></div>
</td>
</tr>
<tr class="requires-v2_2_2">
<tr>
<th data-i18n="antigravityGain"></th>
<td>
<input class="rate-tpa_input" data-setting="antigravity_gain" />
</td>
</tr>
<tr class="requires-v2_2_2">
<tr>
<th data-i18n="antigravityAccelerator"></th>
<td>
<input class="rate-tpa_input" data-setting="antigravity_accelerator" />
</td>
</tr>
<tr class="requires-v2_2_2">
<tr>
<th data-i18n="antigravityCutoff"></th>
<td>
<input class="rate-tpa_input" data-setting="antigravity_cutoff_lpf_hz" />
@ -515,21 +502,21 @@
<div class="helpicon cf_tip" data-i18n_title="dtermSetpointWeightHelp"></div>
</td>
</tr>
<tr class="requires-v2_2">
<tr>
<th data-i18n="d_boost_factor"></th>
<td>
<input data-setting="d_boost_factor" class="rate-tpa_input" />
<div class="helpicon cf_tip" data-i18n_title="d_boost_factor_help"></div>
</td>
</tr>
<tr class="requires-v2_2">
<tr>
<th data-i18n="d_boost_max_at_acceleration"></th>
<td>
<input data-setting="d_boost_max_at_acceleration" class="rate-tpa_input" />
<div class="helpicon cf_tip" data-i18n_title="d_boost_max_at_acceleration_help"></div>
</td>
</tr>
<tr class="requires-v2_2">
<tr>
<th data-i18n="d_boost_gyro_delta_lpf_hz"></th>
<td>
<input data-setting="d_boost_gyro_delta_lpf_hz" class="rate-tpa_input" />

View file

@ -108,6 +108,12 @@ TABS.pid_tuning.initialize = function (callback) {
// translate to user-selected language
localize();
if (semver.gte(CONFIG.flightControllerVersion, "2.4.0")) {
$('.requires-v2_4').show();
} else {
$('.requires-v2_4').hide();
}
helper.tabs.init($('.tab-pid_tuning'));
helper.features.updateUI($('.tab-pid_tuning'), BF_CONFIG.features);
@ -162,28 +168,6 @@ TABS.pid_tuning.initialize = function (callback) {
FILTER_CONFIG.yawLpfHz = parseInt($yawLpfHz.val(), 10);
});
if (semver.gte(CONFIG.flightControllerVersion, "2.2.0")) {
$('.requires-v2_2').show();
} else {
$('.requires-v2_2').hide();
}
if (semver.gte(CONFIG.flightControllerVersion, "2.2.2")) {
$('.requires-v2_2_2').show();
} else {
$('.requires-v2_2_2').hide();
}
if (semver.gte(CONFIG.flightControllerVersion, "2.3.0")) {
$('.requires-v2_3').show();
} else {
$('.requires-v2_3').hide();
}
if (semver.lt(CONFIG.flightControllerVersion, "2.2.0")) {
$('[name=ff]').prop('disabled', 'disabled');
}
if (!FC.isRpyFfComponentUsed()) {
$('.rpy_ff').prop('disabled', 'disabled');
}