optimierung
This commit is contained in:
6
main.py
6
main.py
@@ -261,15 +261,21 @@ class ArduinoGUI:
|
|||||||
port = f'(COM{i}'
|
port = f'(COM{i}'
|
||||||
if (port not in used_ports) and (serPort == None):
|
if (port not in used_ports) and (serPort == None):
|
||||||
serPort = port
|
serPort = port
|
||||||
|
pass
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
for i in range(256):
|
for i in range(256):
|
||||||
port = f'/dev/ttyS{i}'
|
port = f'/dev/ttyS{i}'
|
||||||
if (port not in used_ports) and (serPort == None):
|
if (port not in used_ports) and (serPort == None):
|
||||||
serPort = port
|
serPort = port
|
||||||
|
pass
|
||||||
|
pass
|
||||||
for i in range(256):
|
for i in range(256):
|
||||||
port = f'/dev/ttyUSB{i}'
|
port = f'/dev/ttyUSB{i}'
|
||||||
if (port not in used_ports) and (serPort == None):
|
if (port not in used_ports) and (serPort == None):
|
||||||
serPort = port
|
serPort = port
|
||||||
|
pass
|
||||||
|
pass
|
||||||
|
|
||||||
if serPort != None:
|
if serPort != None:
|
||||||
self.ser = serial.Serial(serPort, 19200, timeout=1, parity=serial.PARITY_EVEN, stopbits=serial.STOPBITS_TWO)
|
self.ser = serial.Serial(serPort, 19200, timeout=1, parity=serial.PARITY_EVEN, stopbits=serial.STOPBITS_TWO)
|
||||||
|
|||||||
Reference in New Issue
Block a user