completely working!
This commit is contained in:
@ -12,7 +12,20 @@ WAIT_AFTER_SEND = 0.15 # Wait after sending command, before requesting input (in
|
||||
|
||||
|
||||
#### ---- High-level port commands
|
||||
|
||||
'''
|
||||
def create_port_connection():
|
||||
prt = None
|
||||
for port, _, _ in sorted(cmd.list_ports.comports()):
|
||||
try:
|
||||
prt = cmd.setup_port_connection(port=port, baudrate=115200, timeout_sec=1)
|
||||
cmd.open_port(prt)
|
||||
reset_port_settings(prt)
|
||||
except:
|
||||
prt.close()
|
||||
continue
|
||||
break
|
||||
return prt
|
||||
'''
|
||||
def create_port_connection():
|
||||
prt = None
|
||||
print()
|
||||
@ -44,6 +57,9 @@ def create_port_connection():
|
||||
break
|
||||
return prt
|
||||
|
||||
|
||||
|
||||
|
||||
# def setup_connection():
|
||||
# prt = cmd.setup_port_connection()
|
||||
# cmd.open_port(prt)
|
||||
|
||||
Reference in New Issue
Block a user