mirror of
https://github.com/meshtastic/python.git
synced 2026-04-25 17:40:55 -04:00
basic stress tester
This commit is contained in:
16
meshtastic/util.py
Normal file
16
meshtastic/util.py
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
import serial
|
||||
import serial.tools.list_ports
|
||||
|
||||
|
||||
def findPorts():
|
||||
"""Find all ports that might have meshtastic devices
|
||||
|
||||
Returns:
|
||||
list -- a list of device paths
|
||||
"""
|
||||
l = list(map(lambda port: port.device,
|
||||
filter(lambda port: port.vid != None,
|
||||
serial.tools.list_ports.comports())))
|
||||
l.sort()
|
||||
return l
|
||||
Reference in New Issue
Block a user