Skip to content

Commit

Permalink
Merge pull request #9 from FoamyGuy/value_return_bool
Browse files Browse the repository at this point in the history
comparison instead of bool function
  • Loading branch information
tannewt authored Jan 8, 2025
2 parents eba437a + 07e7807 commit 609e947
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_pcf8575.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def read_pin(self, pin: int) -> bool:
:param int pin: The pin number
"""

return bool((self.read_gpio() >> pin) & 0x1)
return ((self.read_gpio() >> pin) & 0x1) == 1


"""
Expand Down

0 comments on commit 609e947

Please sign in to comment.