mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-18 05:45:25 +03:00
Add option for manufacturers and developers
This commit is contained in:
parent
3562ed9d3a
commit
706a239044
4 changed files with 28 additions and 3 deletions
|
@ -270,10 +270,13 @@ const serial = {
|
|||
|
||||
chrome.serial.getDevices(function (devices_array) {
|
||||
const devices = [];
|
||||
devices_array.forEach(function (device) {
|
||||
const isFC = self.serialDevices.some(el => el.vendorId === device.vendorId) && self.serialDevices.some(el => el.productId === device.productId);
|
||||
let showAllSerialDevices = false;
|
||||
|
||||
if (isFC) {
|
||||
devices_array.forEach(function (device) {
|
||||
ConfigStorage.get('showAllSerialDevices', res => showAllSerialDevices = res.showAllSerialDevices);
|
||||
const isKnownSerialDevice = self.serialDevices.some(el => el.vendorId === device.vendorId) && self.serialDevices.some(el => el.productId === device.productId);
|
||||
|
||||
if (isKnownSerialDevice || showAllSerialDevices) {
|
||||
devices.push({
|
||||
path: device.path,
|
||||
displayName: device.displayName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue