git.graph-it.com
/
graphit
/
pin-py.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dfd3eb
)
Mask in getValues()
author
Benjamin Braatz
<benjamin.braatz@graph-it.com>
Wed, 11 Nov 2020 10:17:24 +0000
(11:17 +0100)
committer
Benjamin Braatz
<benjamin.braatz@graph-it.com>
Wed, 11 Nov 2020 10:17:24 +0000
(11:17 +0100)
graphit/pin/pcf8574.py
patch
|
blob
|
history
diff --git
a/graphit/pin/pcf8574.py
b/graphit/pin/pcf8574.py
index 6d54e749de5d3c192f322761730ecb4b0266fc86..8c98360ba1367fd92b1f48e6a46b3f26dd5f0caa 100644
(file)
--- a/
graphit/pin/pcf8574.py
+++ b/
graphit/pin/pcf8574.py
@@
-71,7
+71,7
@@
class PCF8574Input(graphit.event.EventEmitterMixin):
return not bool(self.__values & (1 << pin))
def getValues(self) -> int:
- return
~self.__values
+ return
(~self.__values & 0xFF)
class PCF8574Output(graphit.event.EventEmitterMixin):
@@
-106,7
+106,7
@@
class PCF8574Output(graphit.event.EventEmitterMixin):
return not bool(self.__values & (1 << pin))
def getValues(self) -> int:
- return
~self.__values
+ return
(~self.__values & 0xFF)
def setValue(self, pin: int, value: bool) -> None:
assert isinstance(pin, int), 'pin must be an integer'