mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 22:35:17 +03:00
Merge pull request #2163 from McGiverGim/order_blackbox_debug
Add search and order to the blackbox debug modes list
This commit is contained in:
commit
1e583080a2
1 changed files with 16 additions and 0 deletions
|
@ -358,6 +358,22 @@ TABS.onboard_logging.initialize = function (callback) {
|
|||
}
|
||||
|
||||
debugModeSelect.val(FC.PID_ADVANCED_CONFIG.debugMode);
|
||||
|
||||
// Convert to select2 and order alphabetic
|
||||
debugModeSelect.select2({
|
||||
sorter(data) {
|
||||
return data.sort(function(a, b) {
|
||||
if (a.text === "NONE" || b.text === i18n.getMessage('onboardLoggingDebugModeUnknown')) {
|
||||
return -1;
|
||||
} else if (b.text ==="NONE" || a.text === i18n.getMessage('onboardLoggingDebugModeUnknown')) {
|
||||
return 1;
|
||||
} else {
|
||||
return a.text.localeCompare(b.text);
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
} else {
|
||||
$('.blackboxDebugMode').hide();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue