Skip to content

Commit

Permalink
ymodem/sbrb.py:fix a bug sendto not use
Browse files Browse the repository at this point in the history
Signed-off-by: anjiahao <[email protected]>
  • Loading branch information
anjiahao1 committed Sep 27, 2024
1 parent 9162c69 commit 2d96de0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions system/ymodem/sbrb.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,11 +823,12 @@ def recv(self):
tmp = fd_serial.read(len(("sb %s\r\n" % (recvfile)).encode()))
else:
if args.sendto:
fd_serial.write("rb\r\n".encode())
fd_serial.read(len("rb\r\n".encode()))
cmd = ("rb -f %s\r\n" % (args.sendto[0])).encode()
else:
fd_serial.write(("rb\r\n").encode())
fd_serial.read(len(("rb\r\n").encode()))
cmd = ("rb\r\n").encode()

fd_serial.write(cmd)
fd_serial.read(len(cmd))

fd_serial.reset_input_buffer()
sbrb = ymodem(
Expand Down

0 comments on commit 2d96de0

Please sign in to comment.