mirror of
https://github.com/jonathanhogg/scopething
synced 2025-07-13 18:52:10 +01:00
Compare commits
2 Commits
f3748a4c6a
...
58aaf4c74e
Author | SHA1 | Date | |
---|---|---|---|
58aaf4c74e | |||
759828c637 |
@ -24,7 +24,7 @@ class SerialStream:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def devices_matching(cls, vid=None, pid=None, serial_number=None):
|
def devices_matching(cls, vid=None, pid=None, serial_number=None):
|
||||||
for port in comports():
|
for port in comports():
|
||||||
if (vid is None or vid == port.vid) and (pid is None or pid == port.pid) and (serial is None or serial_number == port.serial_number):
|
if (vid is None or vid == port.vid) and (pid is None or pid == port.pid) and (serial_number is None or serial_number == port.serial_number):
|
||||||
yield port.device
|
yield port.device
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Reference in New Issue
Block a user