Merge pull request #2575 from Asizon/convert_serial_protocols_select2
Convert serial rx and Spi rx protocols selectors to Select210.8-maintenance
commit
88b7c9a4d9
|
@ -259,6 +259,17 @@ TABS.receiver.initialize = function (callback) {
|
|||
// select current serial RX type
|
||||
serialRxSelectElement.val(FC.RX_CONFIG.serialrx_provider);
|
||||
|
||||
// Convert to select2 and order alphabetic
|
||||
if (!GUI.isCordova()) {
|
||||
serialRxSelectElement.select2({
|
||||
sorter(data) {
|
||||
return data.sort(function(a, b) {
|
||||
return a.text.localeCompare(b.text);
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_31)) {
|
||||
const spiRxTypes = [
|
||||
'NRF24_V202_250K',
|
||||
|
@ -322,6 +333,17 @@ TABS.receiver.initialize = function (callback) {
|
|||
|
||||
// select current serial RX type
|
||||
spiRxElement.val(FC.RX_CONFIG.rxSpiProtocol);
|
||||
|
||||
if (!GUI.isCordova()) {
|
||||
// Convert to select2 and order alphabetic
|
||||
spiRxElement.select2({
|
||||
sorter(data) {
|
||||
return data.sort(function(a, b) {
|
||||
return a.text.localeCompare(b.text);
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue