From 240b982070ebd9a169f7c37bf50fc2e48fc64a31 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Feb 2018 11:07:55 +1000 Subject: [PATCH] wacom: fix Spark CRC check All it needs is less reversing --- tuhi/wacom.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tuhi/wacom.py b/tuhi/wacom.py index 7f19918..c3929c8 100644 --- a/tuhi/wacom.py +++ b/tuhi/wacom.py @@ -510,10 +510,8 @@ class WacomProtocolBase(WacomProtocolLowLevelComm): data = self.wait_nordic_data(0xc8, 5) if data[0] != 0xed: raise WacomException(f'unexpected answer: {data[0]:02x}') - crc = data[1:] data = self.wait_nordic_data(0xc9, 5) crc = data - crc.reverse() crc = int(binascii.hexlify(bytes(crc)), 16) pen_data = self.pen_data_buffer self.pen_data_buffer = []