Skip to content

Commit 7cd6391

Browse files
Melissa LeBlanc-WilliamsMelissa LeBlanc-Williams
authored andcommitted
saved file before committing this time
1 parent 829f6ab commit 7cd6391

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

adafruit_featherwing/minitft_featherwing.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ def buttons(self):
101101
Return a set of buttons with current push values
102102
"""
103103
button_values = self._ss.digital_read_bulk(self._button_mask)
104-
return Buttons(up=(not button_values & (1 << BUTTON_UP)),
105-
down=(not button_values & (1 << BUTTON_DOWN)),
106-
left=(not button_values & (1 << BUTTON_LEFT)),
107-
right=(not button_values & (1 << BUTTON_RIGHT)),
108-
a=(not button_values & (1 << BUTTON_A)),
109-
b=(not button_values & (1 << BUTTON_B)),
110-
select=(not button_values & (1 << BUTTON_SEL)))
104+
return Buttons(*[not button_values & (1 << button) for button in
105+
(BUTTON_UP, BUTTON_DOWN, BUTTON_LEFT, BUTTON_RIGHT,
106+
BUTTON_A, BUTTON_B, BUTTON_SEL)])

0 commit comments

Comments
 (0)