mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
stop uploading region if line is empty
This commit is contained in:
parent
f41ee950b1
commit
f3b1319eda
1 changed files with 2 additions and 0 deletions
|
|
@ -4058,6 +4058,8 @@ async def repeater_loop(port, baudrate):
|
|||
with open(file_path, "r") as file:
|
||||
ser.write("region load\r".encode())
|
||||
for line in file:
|
||||
if line.strip() == "": # terminate on empty line
|
||||
break
|
||||
ser.write(f"{line.rstrip()}\r".encode())
|
||||
ser.write("\r".encode())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue