Skip to content

Commit

Permalink
comparison instead of bool function
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamyGuy committed Jan 8, 2025
1 parent 366cd94 commit 07e7807
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 07e7807

Please sign in to comment.