Skip to content

Commit bc16e37

Browse files
ensonicddemidov
authored andcommitted
Fix inverted button logic. (#288)
This is needed to work with the latest kernel. See #286
1 parent 0dc13b5 commit bc16e37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ev3dev/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2555,7 +2555,7 @@ def buttons_pressed(self):
25552555
for k, v in self._buttons.items():
25562556
buf = self._buffer_cache[v['name']]
25572557
bit = v['value']
2558-
if not bool(buf[int(bit / 8)] & 1 << bit % 8):
2558+
if bool(buf[int(bit / 8)] & 1 << bit % 8):
25592559
pressed += [k]
25602560
return pressed
25612561

0 commit comments

Comments
 (0)