Skip to content

Commit 2842b79

Browse files
Melissa LeBlanc-WilliamsMelissa LeBlanc-Williams
authored andcommitted
Button Mask not a property anymore
1 parent eed9b5c commit 2842b79

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

adafruit_featherwing/minitft_featherwing.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ class MiniTFTFeatherWing:
5555
<https://www.adafruit.com/product/3321>`_.
5656
5757
Automatically uses the feather's I2C bus."""
58+
59+
_button_mask = ((1 << BUTTON_RIGHT) |
60+
(1 << BUTTON_DOWN) |
61+
(1 << BUTTON_LEFT) |
62+
(1 << BUTTON_UP) |
63+
(1 << BUTTON_SEL) |
64+
(1 << BUTTON_A) |
65+
(1 << BUTTON_B))
66+
5867
def __init__(self, address=0x5E, i2c=None, spi=None):
5968
if i2c is None:
6069
i2c = board.I2C()
@@ -71,16 +80,6 @@ def __init__(self, address=0x5E, i2c=None, spi=None):
7180
self.display = ST7735R(display_bus, width=160, height=80, colstart=24,
7281
rotation=270, bgr=True)
7382

74-
@property
75-
def _button_mask(self):
76-
return ((1 << BUTTON_RIGHT) |
77-
(1 << BUTTON_DOWN) |
78-
(1 << BUTTON_LEFT) |
79-
(1 << BUTTON_UP) |
80-
(1 << BUTTON_SEL) |
81-
(1 << BUTTON_A) |
82-
(1 << BUTTON_B))
83-
8483
@property
8584
def backlight(self):
8685
"""

0 commit comments

Comments
 (0)