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.
1 parent 3e26f98 commit 6c584a8Copy full SHA for 6c584a8
adafruit_featherwing/matrix_featherwing.py
@@ -174,8 +174,10 @@ def brightness(self):
174
Brightness returns the current display brightness.
175
0-15 = Dimmest to Brightest Setting
176
"""
177
- return self._matrix.brightness
+ return round(self._segments.brightness * 15)
178
179
@brightness.setter
180
def brightness(self, brightness):
181
- self._matrix.brightness = brightness
+ if not 0 <= brightness <= 15:
182
+ raise ValueError('Brightness must be a value between 0 and 15')
183
+ self._segments.brightness = brightness / 15
0 commit comments