1- # The MIT License (MIT)
1+ # SPDX-FileCopyrightText: Tony DiCola 2017 for Adafruit Industries
22#
3- # Copyright (c) 2017 Tony DiCola
4- #
5- # Permission is hereby granted, free of charge, to any person obtaining a copy
6- # of this software and associated documentation files (the "Software"), to deal
7- # in the Software without restriction, including without limitation the rights
8- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9- # copies of the Software, and to permit persons to whom the Software is
10- # furnished to do so, subject to the following conditions:
11- #
12- # The above copyright notice and this permission notice shall be included in
13- # all copies or substantial portions of the Software.
14- #
15- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21- # THE SOFTWARE.
3+ # SPDX-License-Identifier: MIT
224
235"""
246`adafruit_is31fl3731`
@@ -232,13 +214,11 @@ def frame(self, frame=None, show=True):
232214 return None
233215
234216 def audio_sync (self , value = None ):
235- """Set the audio sync feature register
236- """
217+ """Set the audio sync feature register"""
237218 return self ._register (_CONFIG_BANK , _AUDIOSYNC_REGISTER , value )
238219
239220 def audio_play (self , sample_rate , audio_gain = 0 , agc_enable = False , agc_fast = False ):
240- """Controls the audio play feature
241- """
221+ """Controls the audio play feature"""
242222 if sample_rate == 0 :
243223 self ._mode (_PICTURE_MODE )
244224 return
@@ -257,8 +237,7 @@ def audio_play(self, sample_rate, audio_gain=0, agc_enable=False, agc_fast=False
257237 self ._mode (_AUDIOPLAY_MODE )
258238
259239 def blink (self , rate = None ):
260- """Updates the blink register
261- """
240+ """Updates the blink register"""
262241 # pylint: disable=no-else-return
263242 # This needs to be refactored when it can be tested
264243 if rate is None :
@@ -300,8 +279,7 @@ def fill(self, color=None, blink=None, frame=None):
300279
301280 @staticmethod
302281 def pixel_addr (x , y ):
303- """Calulate the offset into the device array for x,y pixel
304- """
282+ """Calulate the offset into the device array for x,y pixel"""
305283 return x + y * 16
306284
307285 # pylint: disable-msg=too-many-arguments
@@ -367,16 +345,14 @@ def image(self, img, blink=None, frame=None):
367345
368346
369347class CharlieWing (Matrix ):
370- """Supports the Charlieplexed feather wing
371- """
348+ """Supports the Charlieplexed feather wing"""
372349
373350 width = 15
374351 height = 7
375352
376353 @staticmethod
377354 def pixel_addr (x , y ):
378- """Calulate the offset into the device array for x,y pixel
379- """
355+ """Calulate the offset into the device array for x,y pixel"""
380356 if x > 7 :
381357 x = 15 - x
382358 y += 8
0 commit comments