mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 01:35:28 +03:00
Change lexical scope remaing root
This commit is contained in:
parent
317f937fd5
commit
57539eb6de
10 changed files with 55 additions and 59 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
// return true if user has choose a special peripheral
|
||||
function isPeripheralSelected(peripheralName) {
|
||||
for (var portIndex = 0; portIndex < FC.SERIAL_CONFIG.ports.length; portIndex++) {
|
||||
var serialPort = FC.SERIAL_CONFIG.ports[portIndex];
|
||||
for (let portIndex = 0; portIndex < FC.SERIAL_CONFIG.ports.length; portIndex++) {
|
||||
const serialPort = FC.SERIAL_CONFIG.ports[portIndex];
|
||||
if (serialPort.functions.indexOf(peripheralName) >= 0) {
|
||||
return true;
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ function adjustBoxNameIfPeripheralWithModeID(modeId, defaultName) {
|
|||
default:
|
||||
return defaultName;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return defaultName;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue