mirror of
https://github.com/meshtastic/python.git
synced 2026-04-26 10:03:40 -04:00
doc updates
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
import serial
|
||||
import serial.tools.list_ports
|
||||
|
||||
"""Some devices such as a seger jlink we never want to accidentally open"""
|
||||
blacklistVids = dict.fromkeys([0x1366])
|
||||
|
||||
|
||||
def findPorts():
|
||||
"""Find all ports that might have meshtastic devices
|
||||
@@ -36,7 +39,7 @@ def findPorts():
|
||||
list -- a list of device paths
|
||||
"""
|
||||
l = list(map(lambda port: port.device,
|
||||
filter(lambda port: port.vid != None,
|
||||
filter(lambda port: port.vid != None and port.vid not in blacklistVids,
|
||||
serial.tools.list_ports.comports())))
|
||||
l.sort()
|
||||
return l
|
||||
@@ -77,7 +80,7 @@ class dotdict(dict):
|
||||
list -- a list of device paths
|
||||
"""
|
||||
l = list(map(lambda port: port.device,
|
||||
filter(lambda port: port.vid != None,
|
||||
filter(lambda port: port.vid != None and port.vid not in blacklistVids,
|
||||
serial.tools.list_ports.comports())))
|
||||
l.sort()
|
||||
return l</code></pre>
|
||||
|
||||
Reference in New Issue
Block a user