From 87dd56e7cd821b5e6b07e2e9a867b8f4afad8d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NEDJAR?= Date: Mon, 16 Mar 2026 09:55:03 +0100 Subject: [PATCH] bq27441: Fix checksum overflow in compute_block_checksum(). --- lib/bq27441/bq27441/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bq27441/bq27441/device.py b/lib/bq27441/bq27441/device.py index ab50cac4..4772d958 100644 --- a/lib/bq27441/bq27441/device.py +++ b/lib/bq27441/bq27441/device.py @@ -530,7 +530,7 @@ def compute_block_checksum(self): for i in range(32): csum += data[i] - csum = 255 - csum + csum = (255 - (csum & 0xFF)) & 0xFF return csum # Use the block_data_checksum command to write a checksum value