Browse Source

Update ahoy.py add timestamps

pull/1/head
Jan-Jonas Sämann 3 years ago
parent
commit
1425d46b7e
  1. 3
      tools/rpi/ahoy.py

3
tools/rpi/ahoy.py

@ -235,7 +235,8 @@ def main_loop():
if has_payload:
size = radio.getDynamicPayloadSize()
payload = radio.read(size)
print(f"Received {size} bytes on pipe {pipe_number}: " +
dt = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")
print(f"{dt} Received {size} bytes on pipe {pipe_number}: " +
" ".join([f"{b:02x}" for b in payload]))
on_receive(payload)
else:

Loading…
Cancel
Save