Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a686f1c

Browse files
authoredOct 15, 2024
Merge pull request #47 from IRNAS/support_multiple_endpoints
list_devices: adds support for several com ports
2 parents 8c9459d + 2891553 commit a686f1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/ppk2_api/ppk2_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,13 @@ def list_devices():
219219
devices = [
220220
(port.device, port.serial_number[:8])
221221
for port in ports
222-
if port.description.startswith("nRF Connect USB CDC ACM")
222+
if port.description.startswith("nRF Connect USB CDC ACM") and port.location.endswith("1")
223223
]
224224
else:
225225
devices = [
226226
(port.device, port.serial_number[:8])
227227
for port in ports
228-
if port.product == "PPK2"
228+
if port.product == "PPK2" and port.location.endswith("1")
229229
]
230230
return devices
231231

0 commit comments

Comments
 (0)
Please sign in to comment.