From 9159be7c8b48c71af44dceadd66866cdb00d3094 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 3 Feb 2025 11:12:48 -0600 Subject: [PATCH 1/2] revert longint change --- adafruit_hx711/hx711.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_hx711/hx711.py b/adafruit_hx711/hx711.py index e1503b4..584f987 100644 --- a/adafruit_hx711/hx711.py +++ b/adafruit_hx711/hx711.py @@ -123,7 +123,7 @@ def _read_channel_raw(self, chan_gain: int) -> int: # Convert to 32-bit signed integer if value & 0x80_00_00: - value -= 0x1_00_00_00 + value |= 0xFF_00_00_00 return value From cc0cc91b5773a1d1c4f8e5735263e9ab988670ec Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 3 Feb 2025 11:29:48 -0600 Subject: [PATCH 2/2] note about longint in readme --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index 0178c62..2c2fa2e 100644 --- a/README.rst +++ b/README.rst @@ -38,6 +38,8 @@ or individual libraries can be installed using `Purchase one from the Adafruit shop `_ +This driver does not support MCU's without longint support. + Installing from PyPI =====================