Add dynamic notch disabled warning

10.7.0-preview
IvoFPV 2019-08-11 11:09:50 +02:00
parent b39f7df5f7
commit 065d7176f3
3 changed files with 14 additions and 0 deletions

View File

@ -3126,6 +3126,9 @@
"pidTuningDynamicNotchFilterHelp": {
"message": "Dynamic Notch Filter tracks peak motors noise frequency and places one or two notch filters with their center at that frequency."
},
"pidTuningDynamicNotchFilterDisabledWarning": {
"message": "<span class=\"message-negative\">Warning:</span> Dynamic Notch Filter is disabled, please enable it as a feature in the Configuration tab to show related settings."
},
"pidTuningDynamicNotchRange": {
"message": "Dynamic Notch Filter Range"
},

View File

@ -1819,9 +1819,15 @@ TABS.pid_tuning.updateFilterWarning = function() {
var dtermDynamicLowpassEnabled = $('input[id="dtermLowpassDynEnabled"]').is(':checked');
var dtermLowpass1Enabled = $('input[id="dtermLowpassEnabled"]').is(':checked');
var warning_e = $('#pid-tuning .filterWarning');
var warningDynamicNotch_e = $('#pid-tuning .dynamicNotchWarning');
if (!(gyroDynamicLowpassEnabled || gyroLowpass1Enabled) || !(dtermDynamicLowpassEnabled || dtermLowpass1Enabled)) {
warning_e.show();
} else {
warning_e.hide();
}
if (FEATURE_CONFIG.features.isEnabled('DYNAMIC_FILTER')) {
warningDynamicNotch_e.hide();
} else {
warningDynamicNotch_e.show();
}
}

View File

@ -696,6 +696,11 @@
<p i18n="filterWarning"></p>
</div>
</div>
<div class="note dynamicNotchWarning">
<div class="note_spacer">
<p i18n="pidTuningDynamicNotchFilterDisabledWarning"></p>
</div>
</div>
<div class="cf_column two_columns">
<div class="gui_box grey topspacer pid_filter two_columns_first">