Skip to content

Commit 1b63515

Browse files
authored
Merge pull request #5 from FoamyGuy/revert_longint
Revert longint
2 parents b8b9251 + cc0cc91 commit 1b63515

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ or individual libraries can be installed using
3838

3939
`Purchase one from the Adafruit shop <http://www.adafruit.com/products/5974>`_
4040

41+
This driver does not support MCU's without longint support.
42+
4143
Installing from PyPI
4244
=====================
4345

adafruit_hx711/hx711.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def _read_channel_raw(self, chan_gain: int) -> int:
123123

124124
# Convert to 32-bit signed integer
125125
if value & 0x80_00_00:
126-
value -= 0x1_00_00_00
126+
value |= 0xFF_00_00_00
127127

128128
return value
129129

0 commit comments

Comments
 (0)