mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-21 07:15:15 +03:00
Add search and order to the blackbox debug modes list
This commit is contained in:
parent
6370a0153c
commit
062017b0a6
1 changed files with 16 additions and 0 deletions
|
@ -353,6 +353,22 @@ TABS.onboard_logging.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
debugModeSelect.val(FC.PID_ADVANCED_CONFIG.debugMode);
|
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 {
|
} else {
|
||||||
$('.blackboxDebugMode').hide();
|
$('.blackboxDebugMode').hide();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue