1
0
Fork 0
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:
Mark Haslinghuis 2021-12-03 22:12:58 +01:00
parent 3562ed9d3a
commit 706a239044
No known key found for this signature in database
GPG key ID: 198B0F616296A584
4 changed files with 28 additions and 3 deletions

View file

@ -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,