Skip to content

Commit 8103728

Browse files
committed
More build
1 parent da6dc1f commit 8103728

File tree

1 file changed

+26
-23
lines changed

1 file changed

+26
-23
lines changed

src/js/tabs/auxiliary.js

+26-23
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,32 @@ let categoryTable = [
4848
{ name: 'VTX', buildKey: ['vtx'], modes: ['STICK COMMANDS DISABLE', 'VTX CONTROL DISABLE', 'VTX PIT MODE']},
4949
];
5050

51+
function isInBuildKey(map, name) {
52+
if (name === 'all') {
53+
return true;
54+
}
55+
for (let i = 0; i < map.length; i++) {
56+
if (name == map[i].buildKey) {
57+
return FC.CONFIG.buildOptions.includes(map[i].buildOption);
58+
}
59+
}
60+
return false;
61+
}
62+
63+
function isFlightMode(name) {
64+
return flightModes.includes(name);
65+
}
66+
67+
function createCategorySelect(table) {
68+
let categorySelect = $('select.auxiliary_category_select');
69+
70+
for (let i = 0; i < table.length; i++) {
71+
if (isInBuildKey(buildMap, table[i].buildKey)) {
72+
categorySelect.append(`<option value="${table[i].name}">${table[i].name}</option>`);
73+
}
74+
}
75+
}
76+
5177
function createTable(data) {
5278
// Create a dynamic table with fixed values
5379
let table = [];
@@ -104,29 +130,6 @@ The simulateMouseoverAndSelectForEachOption function iterates over each option i
104130
You can also add a delay between each iteration if needed (commented out in the code). Adjust the delay according to your requirements.
105131
*/
106132

107-
function isInBuildKey(map, name) {
108-
109-
if(name === 'all') {
110-
return true;
111-
}
112-
for (let i = 0; i < map.length; i++) {
113-
return flightModes.includes(name);
114-
}
115-
}
116-
117-
function isFlightMode(name) {
118-
return flightModes.includes(name);
119-
}
120-
121-
function createCategorySelect(table) {
122-
let categorySelect = $('select.auxiliary_category_select');
123-
124-
for (let i = 0; i < table.length; i++) {
125-
if (isInBuildKey(buildMap, table[i].buildKey)) {
126-
categorySelect.append(`<option value="${table[i].name}">${table[i].name}</option>`);
127-
}
128-
}
129-
}
130133

131134
auxiliary.initialize = function (callback) {
132135
GUI.active_tab_ref = this;

0 commit comments

Comments
 (0)