Commit 51945769 authored by Pawel Spychalski (DzikuVx)'s avatar Pawel Spychalski (DzikuVx)
Browse files

Basic PID Tab rework

parent af5855be
......@@ -3168,7 +3168,10 @@
"message": "BIQUAD offers better noise attenuation for a price of higher delay. PT1 has lower attenuation but offers lower delay."
},
"tabFilteringAdvanced": {
"message": "Advanced filtering"
"message": "Other filters"
},
"mainFilters": {
"message": "Main filters"
},
"acc_lpf_type": {
"message": "Accelerometer LPF type"
......
......@@ -106,6 +106,7 @@ sources.js = [
'./js/logicConditionsStatus.js',
'./js/vtx.js',
'./main.js',
'./js/tabs.js',
'./tabs/*.js',
'./js/eventFrequencyAnalyzer.js',
'./js/periodicStatusUpdater.js',
......
'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;
})();
\ No newline at end of file
......@@ -2089,4 +2089,35 @@ select {
#modal-reconnect div {
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;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -109,6 +109,8 @@ TABS.pid_tuning.initialize = function (callback) {
// translate to user-selected language
localize();
helper.tabs.init($('.tab-pid_tuning'));
hideUnusedPids(CONFIG.activeSensors);
$('#showAllPids').on('click', function(){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment