From 0df4f38dac0e7f6f8f489df2c29a57a28b457e7a Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 11 Nov 2022 20:43:39 +0100 Subject: [PATCH] RPI: remove unused function and import --- tools/rpi/hoymiles/__init__.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/rpi/hoymiles/__init__.py b/tools/rpi/hoymiles/__init__.py index 38ca4a20..5892e9a0 100644 --- a/tools/rpi/hoymiles/__init__.py +++ b/tools/rpi/hoymiles/__init__.py @@ -9,7 +9,6 @@ import struct import time import re from datetime import datetime -import json import crcmod from RF24 import RF24, RF24_PA_MIN, RF24_PA_LOW, RF24_PA_HIGH, RF24_PA_MAX, RF24_250KBPS, RF24_CRC_DISABLED, RF24_CRC_8, RF24_CRC_16 from .decoders import * @@ -51,16 +50,6 @@ def ser_to_esb_addr(inverter_ser): air_order = ser_to_hm_addr(inverter_ser)[::-1] + b'\x01' return air_order[::-1] -def print_addr(inverter_ser): - """ - Debug print addresses - - :param str inverter_ser: inverter serial - """ - print(f"ser# {inverter_ser} ", end='') - print(f" -> HM {' '.join([f'{byte:02x}' for byte in ser_to_hm_addr(inverter_ser)])}", end='') - print(f" -> ESB {' '.join([f'{byte:02x}' for byte in ser_to_esb_addr(inverter_ser)])}") - class ResponseDecoderFactory: """ Prepare payload decoder