Skip to content

Commit 74c950f

Browse files
committed
Pass bytearray to crc checksum calculator
Closes: #12 Related: Nicoretti/crc#113
1 parent 02aa360 commit 74c950f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fnirsi_logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def decode(data, calculate_crc, time_interval):
141141

142142
if calculate_crc:
143143
actual_checksum = data[-1]
144-
expected_checksum = calculate_crc(data[1:-1])
144+
expected_checksum = calculate_crc(bytearray(data[1:-1]))
145145
if actual_checksum != expected_checksum:
146146
print(
147147
f"Ignoring packet of length {len(data)} with unexpected checksum. "

0 commit comments

Comments
 (0)