Added search for windows COM ports

This commit is contained in:
Holger Weber
2026-03-20 00:10:49 +01:00
parent a0f8a06daf
commit 6aa6a6637f
2 changed files with 5 additions and 0 deletions

View File

@@ -64,6 +64,9 @@ def findPort():
if port[0].startswith("/dev/ttyUSB"): if port[0].startswith("/dev/ttyUSB"):
ebb_port = port[0] # Success; EBB found by name match. ebb_port = port[0] # Success; EBB found by name match.
break # stop searching-- we are done. break # stop searching-- we are done.
elif port[0].startswith("COM"):
ebb_port = port[0] # Success; EBB found by name match.
break # stop searching-- we are done.
for port in com_ports_list: for port in com_ports_list:
if port[1].startswith("EiBotBoard"): if port[1].startswith("EiBotBoard"):
ebb_port = port[0] # Success; EBB found by name match. ebb_port = port[0] # Success; EBB found by name match.
@@ -215,6 +218,8 @@ def listEBBports():
port_has_ebb = False port_has_ebb = False
if port[0].startswith("/dev/ttyUSB"): if port[0].startswith("/dev/ttyUSB"):
port_has_ebb = True port_has_ebb = True
elif port[0].startswith("COM"):
port_has_ebb = True
elif port[1].startswith("EiBotBoard"): elif port[1].startswith("EiBotBoard"):
port_has_ebb = True port_has_ebb = True
elif port[2].startswith("USB VID:PID=04D8:FD92"): elif port[2].startswith("USB VID:PID=04D8:FD92"):