Update __init__.py (short one line)

Use the function 'hexify_payload()' in other lines
This commit is contained in:
DanielR92 2022-06-30 09:31:19 +02:00 committed by GitHub
parent b1f09d482f
commit 121ce7cbe7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"""