mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-19 03:46:11 +02:00
Update ahoy.py add timestamps
This commit is contained in:
parent
d83b9e1a8d
commit
1425d46b7e
1 changed files with 2 additions and 1 deletions
|
@ -235,7 +235,8 @@ def main_loop():
|
||||||
if has_payload:
|
if has_payload:
|
||||||
size = radio.getDynamicPayloadSize()
|
size = radio.getDynamicPayloadSize()
|
||||||
payload = radio.read(size)
|
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]))
|
" ".join([f"{b:02x}" for b in payload]))
|
||||||
on_receive(payload)
|
on_receive(payload)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue