We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 762cda9 + 4c813a9 commit 68eab43Copy full SHA for 68eab43
ev3dev.py
@@ -1825,15 +1825,7 @@ def any(self):
1825
return bool(self.buttons_pressed)
1826
1827
def check_buttons(self,buttons=[]):
1828
- if len(buttons) == 0:
1829
- return False
1830
- s = self.buttons_pressed
1831
- if len(s) == 0:
1832
1833
- for b in buttons:
1834
- if b not in s:
1835
1836
- return True
+ return set(self.buttons_pressed) == set(buttons)
1837
1838
if current_platform() == 'ev3':
1839
#~autogen button-property platforms.ev3.button>currentClass
0 commit comments