diff options
author | Kevin Eifinger <k.eifinger@googlemail.com> | 2020-04-19T06·49+0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19T06·49+0200 |
commit | ed87b8d1de4f5f7ba45dc45bf77c2deeb474a828 (patch) | |
tree | 704c9f642bb465b4247c847ce28ab5ed596523c3 | |
parent | 2f1ac5c9d32dfbfc8ea43023c070cc8b8dc9d8d0 (diff) |
Add missing "self." to calculate_crc16 uses (#344)
-rw-r--r-- | broadlink/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py index 1a3873ed4fe6..b8f191fb47dd 100644 --- a/broadlink/__init__.py +++ b/broadlink/__init__.py @@ -739,7 +739,7 @@ class hysen(device): def send_request(self, input_payload): - crc = calculate_crc16(bytes(input_payload)) + crc = self.calculate_crc16(bytes(input_payload)) # first byte is length, +2 for CRC16 request_payload = bytearray([len(input_payload) + 2, 0x00]) @@ -763,7 +763,7 @@ class hysen(device): response_payload_len = response_payload[0] if response_payload_len + 2 > len(response_payload): raise ValueError('hysen_response_error', 'first byte of response is not length') - crc = calculate_crc16(bytes(response_payload[2:response_payload_len])) + crc = self.calculate_crc16(bytes(response_payload[2:response_payload_len])) if (response_payload[response_payload_len] == crc & 0xFF) and ( response_payload[response_payload_len + 1] == (crc >> 8) & 0xFF): return response_payload[2:response_payload_len] |