doc updates

This commit is contained in:
geeksville
2020-05-22 11:04:31 -07:00
parent 94175874f0
commit bf085ab1d4
3 changed files with 49 additions and 33 deletions

View File

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