Browse Source

Update __init__.py (short one line)

Use the function 'hexify_payload()' in other lines
pull/84/head
DanielR92 3 years ago
committed by GitHub
parent
commit
121ce7cbe7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      tools/rpi/hoymiles/__init__.py

3
tools/rpi/hoymiles/__init__.py

@ -263,8 +263,7 @@ class InverterPacketFragment:
c_datetime = self.time_rx.strftime("%Y-%m-%d %H:%M:%S.%f")
size = len(self.frame)
channel = f' channel {self.ch_rx}' if self.ch_rx else ''
raw = " ".join([f"{b:02x}" for b in self.frame])
return f"{c_datetime} Received {size} bytes{channel}: {raw}"
return f"{c_datetime} Received {size} bytes{channel}: {hexify_payload(self.frame)}"
class HoymilesNRF:
"""Hoymiles NRF24 Interface"""

Loading…
Cancel
Save