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 ===================== 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