mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-28 17:56:21 +02:00
minor formatting improvements
This commit is contained in:
parent
8ec61d40db
commit
5eed17b8c1
1 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ def on_receive(p):
|
|||
|
||||
ts = datetime.utcnow()
|
||||
ts_unixtime = ts.timestamp()
|
||||
print(ts.isoformat(), end=' ')
|
||||
print(ts.isoformat(), end='Z ')
|
||||
|
||||
# interpret content
|
||||
if p[0] == 0x95:
|
||||
|
@ -119,7 +119,7 @@ def on_receive(p):
|
|||
elif cmd==2:
|
||||
uk1, uk2, uk3, uk4, uk5, u, f, p = struct.unpack(
|
||||
'>HHHHHHHH', p[10:26])
|
||||
print(f'u={u/10}V, f={f/100}Hz, p={p/10}W, ', end='')
|
||||
print(f'u={u/10:.1f}V, f={f/100:.2f}Hz, p={p/10:.1f}W, ', end='')
|
||||
print(f'uk1={uk1}, ', end='')
|
||||
print(f'uk2={uk2}, ', end='')
|
||||
print(f'uk3={uk3}, ', end='')
|
||||
|
|
Loading…
Add table
Reference in a new issue