Skip to content

Commit

Permalink
tools: add an info message in xfer.py to know which operation is in…
Browse files Browse the repository at this point in the history
… progress
  • Loading branch information
Zeal8bit committed Dec 26, 2024
1 parent 6618e7c commit d745c52
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/xfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def xfer_send():
# Let's have a timeout of around one second
ser = serial.Serial(args.ttynode, args.baudrate, timeout=args.baudrate)

print(f"Sending file {args.file} to {args.ttynode}...")

# Get the file name and size
file_name = os.path.basename(args.file)
# Truncate the file name to 16 characters if too long
Expand Down Expand Up @@ -101,6 +103,8 @@ def xfer_receive():
# Blocking reads here, no timeout
ser = serial.Serial(args.ttynode, args.baudrate)

print(f"Receiving file from {args.ttynode}...")

packet = ser.read(PACKET_SIZE)
if not packet:
print("Error: No data received.")
Expand Down

0 comments on commit d745c52

Please sign in to comment.