mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-25 01:05:12 +03:00
Filter list of Linux devices to more sane set (front page and SITL)
This commit is contained in:
parent
9c66cd9c0e
commit
3d3f5aac8e
2 changed files with 24 additions and 14 deletions
|
@ -112,7 +112,16 @@ class ConnectionSerial extends Connection {
|
|||
GUI.log("Unable to list serial ports.");
|
||||
} else {
|
||||
ports.forEach(port => {
|
||||
if (GUI.operating_system == 'Linux') {
|
||||
/* Limit to: USB serial, RFCOMM (BT), 6 legacy devices */
|
||||
if (port.pnpId ||
|
||||
port.path.match(/rfcomm\d*/) ||
|
||||
port.path.match(/ttyS[0-5]$/)) {
|
||||
devices.push(port.path);
|
||||
}
|
||||
} else {
|
||||
devices.push(port.path);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (callback)
|
||||
|
|
|
@ -145,10 +145,11 @@ var Ser2TCP = {
|
|||
if (m)
|
||||
devices.push(m[0]);
|
||||
} else {
|
||||
if (device.displayName != null) {
|
||||
var m = device.path.match(/\/dev\/.*/)
|
||||
if (m)
|
||||
devices.push(m[0]);
|
||||
/* Limit to: USB serial, RFCOMM (BT), 6 legacy devices */
|
||||
if (device.pnpId ||
|
||||
device.path.match(/rfcomm\d*/) ||
|
||||
device.path.match(/ttyS[0-5]$/)) {
|
||||
devices.push(device.path);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue