1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-26 09:45:23 +03:00

Basic PID Tab rework

This commit is contained in:
Pawel Spychalski (DzikuVx) 2019-11-21 22:20:44 +01:00
parent af5855be97
commit 51945769c7
7 changed files with 1745 additions and 1653 deletions

View file

@ -3168,7 +3168,10 @@
"message": "BIQUAD offers better noise attenuation for a price of higher delay. PT1 has lower attenuation but offers lower delay." "message": "BIQUAD offers better noise attenuation for a price of higher delay. PT1 has lower attenuation but offers lower delay."
}, },
"tabFilteringAdvanced": { "tabFilteringAdvanced": {
"message": "Advanced filtering" "message": "Other filters"
},
"mainFilters": {
"message": "Main filters"
}, },
"acc_lpf_type": { "acc_lpf_type": {
"message": "Accelerometer LPF type" "message": "Accelerometer LPF type"

View file

@ -106,6 +106,7 @@ sources.js = [
'./js/logicConditionsStatus.js', './js/logicConditionsStatus.js',
'./js/vtx.js', './js/vtx.js',
'./main.js', './main.js',
'./js/tabs.js',
'./tabs/*.js', './tabs/*.js',
'./js/eventFrequencyAnalyzer.js', './js/eventFrequencyAnalyzer.js',
'./js/periodicStatusUpdater.js', './js/periodicStatusUpdater.js',

27
js/tabs.js Normal file
View file

@ -0,0 +1,27 @@
'use strict';
var helper = helper || {};
helper.tabs = (function () {
let self = {},
$container;
function onHeaderClick(event) {
let $cT = $(event.currentTarget),
attrFor = $cT.attr("for");
$container.find('.subtab__header_label').removeClass("subtab__header_label--current");
$cT.addClass("subtab__header_label--current");
$container.find(".subtab__content--current").removeClass("subtab__content--current");
$container.find("#" + attrFor).addClass("subtab__content--current");
};
self.init = function ($dom) {
$container = $dom;
$container.find(".subtab__header_label").click(onHeaderClick);
};
return self;
})();

View file

@ -2089,4 +2089,35 @@ select {
#modal-reconnect div { #modal-reconnect div {
text-align: center; text-align: center;
}
.subtab__header {
padding: 0;
height: auto;
}
.subtab__header_label {
display: inline-block;
padding: 0 1em;
background-color: #ccc;
min-width: 7em;
height: 1.5em;
line-height: 1.5em;
cursor: pointer;
}
.subtab__header_label--current {
font-weight: bold;
}
.subtab__header_label:hover {
background-color: #c5c5c5;
}
.subtab__content {
display: none;
}
.subtab__content--current {
display: block;
} }

2292
package-lock.json generated

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -109,6 +109,8 @@ TABS.pid_tuning.initialize = function (callback) {
// translate to user-selected language // translate to user-selected language
localize(); localize();
helper.tabs.init($('.tab-pid_tuning'));
hideUnusedPids(CONFIG.activeSensors); hideUnusedPids(CONFIG.activeSensors);
$('#showAllPids').on('click', function(){ $('#showAllPids').on('click', function(){